Skip to content

Commit

Permalink
Create main2.as
Browse files Browse the repository at this point in the history
  • Loading branch information
asyncfinkd authored May 4, 2021
1 parent c975de6 commit 62b37ac
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions main2.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package {

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);


}
}
}

0 comments on commit 62b37ac

Please sign in to comment.