From 6217db662fcc08302790c0320fbf516cfc7d6b73 Mon Sep 17 00:00:00 2001 From: Karthikeyan VJ Date: Tue, 8 Jan 2013 21:27:22 +0200 Subject: [PATCH] Update a/actionscript3.as --- a/actionscript3.as | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/a/actionscript3.as b/a/actionscript3.as index ab3606b95..c352ca71f 100644 --- a/a/actionscript3.as +++ b/a/actionscript3.as @@ -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); + + } } -} \ No newline at end of file +}