Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Update a/actionscript3.as #98

Merged
merged 1 commit into from

2 participants

@goldenratio

A better version.

@leachim6 leachim6 merged commit 3f05a23 into leachim6:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 8, 2013
  1. @goldenratio

    Update a/actionscript3.as

    goldenratio authored
This page is out of date. Refresh to see the latest.
Showing with 29 additions and 5 deletions.
  1. +29 −5 a/actionscript3.as
View
34 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);
+
+
}
}
-}
+}
Something went wrong with that request. Please try again.