Wednesday, August 24, 2005

Another flash blog - htmltext

Another one of those things that i've found out how to do before, but completely forgot how to do 6 months after. Since flash have no way to set color to individual words in a textfield, i had to use htmltext to format my text.

To do htmltext, two steps:

1. set the textfield to be "render text as html"
2. when setting text to textfield, use "txt.htmlText", NOT just regular .text.

Now to color text, this would not work (altough they work in html, rendered in ie anyway)


<font color=0xFFCE00>asdf</font> nor
<font color=FFCE00>asdf</font> NOR
<font color='FFCE00'>asdf</font>



flash is very picky. It needs to be <font color='#FFCE00'>asdf</font>

0 Comments:

Post a Comment

<< Home