/ Published in: ActionScript 3

Confusing but here's the rule. TextFields can use stylesheets. TextArea or TextInput need a new TextFormat()
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var textAreaFormat:TextFormat = new TextFormat(); textAreaFormat.size = 30; textAreaFormat.italic = true; var ta:TextArea = new TextArea(); ta.x = 100; ta.y = 100; ta.width = 300; ta.height = 300; ta.setStyle("textFormat", textAreaFormat); ta.htmlText = "This is text within a text area"; addChild(ta);
Comments
