as3 formatting a textfield
- by duckofrubber
Hi,
I'm dynamically creating textfields in as3, and formatting them with the TextFormat class. I'm having some issues though with selecting the exact "style" of font to apply to the textfields. My code so far looks like:
formatT = new TextFormat( );
formatT.bold = false;
formatT.color = 0x000000;
formatT.font = "TradeGothic";
formatT.size = 16;
var textItem = new TextField();
textItem.text = "foobar";
textItem.setTextFormat(formatT);
addChild(textItem);
This works ("Trade Gothic" is applied to the enclosed text), however I can't figure out how to apply a specific style of "Trade Gothic", for instance "Light Oblique". Is there some way that I can specify this using the TextFormat class?
Thanks.