2011-04-07 11:16:57 +12:00
|
|
|
package {
|
2013-01-08 21:27:22 +02:00
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
2011-04-07 11:16:57 +12:00
|
|
|
}
|
|
|
|
}
|
2013-01-08 21:27:22 +02:00
|
|
|
}
|