Help with TLF text

Hey all,

I’m having an extremely difficult time understanding how to work with this new text engine. There’s not much available online in the way of examples (I’m a mid-level to low programmer), and the Actionscript 3.0 bible that I got tends to go over my head when it comes to this.

Here’s the problem:

[LIST]
[]I have a TLF textbox on the stage named allText with text inside it.
[
]Some text has html markup tags
[*]Some text is formatted locally
[/LIST]

At runtime I set the text to htmlText in order to format the marked up text. This strips the tlfMarkup or local formatting. When I store the tlfMarkup in a string, set the htmlText, then set the tlfMarkup on the textfield, it doesn’t work. It seems I can only have one or the other.

Anyone have any idea how I could have both? I have zero understanding of TextFlow and all that, so forgive me if there’s an easy solution here. Thanks!

Here’s my init function:

public var textformat = new TextFormat();
		public function init(font = "Trebuchet MS", size = 12, color = 0x000000):void
		{
			
			textformat.color = color;
			textformat.font = font;
			textformat.size = size;
			
			
			var test = allText.tlfMarkup;
			trace(test);
			
			allText.autoSize = TextFieldAutoSize.LEFT;
			allText.selectable = false;
			allText.defaultTextFormat = textformat;
			allText.setTextFormat(textformat);
			allText.tlfMarkup = test;
			allText.htmlText = allText.text;
			
			allText.wordWrap = true;
			allText.embedFonts = true;
			
			
		}