package{
import flash.display.Sprite;
import flash.text.*;
public class Main extends Sprite{
public function Main(){
var t:TextField = new TextField( );
t.width = 300;
var defaultFormat:TextFormat = new TextFormat( );
defaultFormat.size = 20;
defaultFormat.color = 0xFF0000;
defaultFormat.font = "Verdana";
t.defaultTextFormat = defaultFormat;
t.text = "This is 20 pt red Verdana";
addChild(t);
}
}
}
|