I’m exhausted and having a brain fart.
What the hell do I have to do to get bold tags working in HTML text?
Code for text area:
private function addTextElement(w:int, xPos:int, yPos:int):void
{
_textArea = new TextField;
_textArea.antiAliasType = AntiAliasType.ADVANCED;
_textArea.defaultTextFormat = Styles.contentStyle;
_textArea.embedFonts = true;
_textArea.multiline = true;
_textArea.selectable = false;
_textArea.autoSize = TextFieldAutoSize.LEFT;
_textArea.wordWrap = true;
_textArea.width = w;
_textArea.x = xPos;
_textArea.y = yPos;
addChild(_textArea);
}
TextFormat:
public static function get contentStyle():TextFormat
{
var newFormat:TextFormat = new TextFormat();
var newFont:Font = new Arial();
newFormat.align = TextFormatAlign.LEFT;
newFormat.color = 0xFFFFFF;
newFormat.font = newFont.fontName;
newFormat.leading = 2.5;
return newFormat;
}
XML Text:
<![CDATA[<font size="18">See how easy</font>... start your <b>FREE</b> trial today. ]]>
The font size works, but not the bold. It’s just Arial. I have both the bold version and the normal version embedded in the file.