# Dynamic text box with html problem!

**URL:** https://forum.kirupa.com/t/dynamic-text-box-with-html-problem/129149
**Category:** Uncategorized
**Created:** [November 20, 2004, 2:30am UTC](https://forum.kirupa.com/t/dynamic-text-box-with-html-problem/129149 "2004-11-20T02:30:55Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Tyler](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@Tyler](https://forum.kirupa.com/u/Tyler)
#### Post date: [November 20, 2004, 2:30am UTC](https://forum.kirupa.com/t/dynamic-text-box-with-html-problem/129149/1 "2004-11-20T02:30:55Z")

</div>

\_root.createTextField(“mainTitle”,10,320,40,200,200);  
mainTitle.html=true;  
mainTitle.autoSize=true;  
mainTitle.border=true;  
mainTitle.multiline=true;  
mainTitle.wordWrap=true;  
mainTitle.background=true;  
mainTitle.backgroundColor=0x333310;  
mainTitle.variable=“firstTitle”;  
//Create a new text format to apply to mainTitle  
myTextFormat=new TextFormat();  
myTextFormat.font=“Arial”;  
myTextFormat.align=“right”;  
myTextFormat.size=19;  
myTextFormat.color=0xFFFFFF;  
mainTitle.setNewTextFormat(myTextFormat);  
firstTitle="\<B\>Ahhh\</B\> am gettinglost in ActionScript!";

If i test the movie with this code exactly the mytextFormat doesn’t affect the variable firstTitle and i get a default font with the \<B\> affecting the “Ahhh”.  
When i remove the 2nd line of my code which sets my dynamic textBox to accept html tags the TextFormat works but off course i get the \<B\> and \</B\> as well since i removed the html thing.

My question is why? It seems i can’t use html with textFormat at the same time ☹

Am sure i can i must have made a very stupid and obvious mistake.Can anyone help??

Thanks.
