# Help with TLF text

**URL:** <https://forum.kirupa.com/t/help-with-tlf-text/321547>\
**Category:** Uncategorized\
**Created:** [April 22, 2011, 4:56pm UTC](https://forum.kirupa.com/t/help-with-tlf-text/321547 "2011-04-22T16:56:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![heiny99](https://avatars.discourse-cdn.com/v4/letter/h/977dab/32.png) [@heiny99](https://forum.kirupa.com/u/heiny99)\
**Post date:** [April 22, 2011, 4:56pm UTC](https://forum.kirupa.com/t/help-with-tlf-text/321547/1 "2011-04-22T16:56:50Z")

</div>

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:

```auto
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;
			
			
		}

```
