Create a textfield


/ Published in: ActionScript 3
Save to your folder(s)

Create a textfield and add a format


Copy this code and paste it in your HTML
  1. var textFormat:TextFormat = new TextFormat;
  2. textFormat.font = "verdana";
  3. textFormat.color = 0xFFFFFF;
  4.  
  5. textField = new TextField;
  6. textField.width = 400;
  7. textField.autoSize = TextFieldAutoSize.LEFT;
  8. textField.multiline = true;
  9. textField.defaultTextFormat = textFormat;
  10. textField.htmlText = "My text";
  11. addChild(textField);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.