Create a text format object first and then add it to a text field with "setTextFormat".
var textFormat:TextFormat = new TextFormat();
textFormat.color = 0xFF0000;
textFormat.size = 32;
var textField:TextField = new TextField();
textField.autoSize = TextFieldAutoSize.LEFT;
textField.wordWrap = true;
textField.text = "The quick brown fox ";
textField.width = 500;
textField.x = 25;
textField.y = 25;
textField.setTextFormat(textFormat);
addChild(textField);
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment