forked from leachim6/hello-world
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request leachim6#98 from goldenratio/patch-1
Update a/actionscript3.as
- Loading branch information
Showing
1 changed file
with
29 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,32 @@ | ||
package { | ||
import flash.display.Sprite; | ||
public class HelloWorld extends Sprite { | ||
public function HelloWorld():void { | ||
trace("Hello World"); | ||
|
||
import flash.display.Sprite; | ||
import flash.text.TextField; | ||
import flash.text.TextFieldAutoSize; | ||
import flash.text.TextFormat; | ||
|
||
[SWF(width='800', height='600', backgroundColor='#cccccc', frameRate='30')] | ||
|
||
public class HelloFlash extends Sprite | ||
{ | ||
public function HelloFlash() | ||
{ | ||
var format:TextFormat = new TextFormat(); | ||
format.font = "Arial"; | ||
format.size = 20; | ||
format.color = 0x0000; | ||
|
||
var textField:TextField = new TextField(); | ||
textField.defaultTextFormat = format; | ||
|
||
textField.border = false; | ||
textField.autoSize = TextFieldAutoSize.LEFT; | ||
textField.selectable = false; | ||
|
||
textField.text = "Hello World"; | ||
addChild(textField); | ||
|
||
|
||
} | ||
} | ||
} | ||
} |