CDATA issue with HTML text

Hello,
I have an htmlTextField that I am loading html text from a xml doc. the problem is that the text is not rendering as html. so all my HTML is displayed in the textField.

here is the XML:


<description><![CDATA[<b>Recipe</b> for a tremendously ... ]]></description>

here is the AS:


myDescription.htmlText = pageDescription[m];

but if i do this:


myDescription.htmlText = "<b>Recipe</b> for a tremendously ... ";

the html displays correct. so I know that the textField is setup to display the html. when I trace pageDescription I get:


&lt;b&gt;Recipe&lt;/b&gt; for a tremendously ...

I’m not sure how to fix this. Can anyone help me? thanks.

This entirely depends on what is contained in pageDescription[m]

Make sure you set it to the *nodeValue *and not just the node…

for(var i:Number = 0; i < myXML.length; i++) {
pageDescription* = myXML.childNodes*.firstChild.nodeValue;
}

plus you need to say to your textfield:


myDescription.html = true;

Second - textfield in flash 8 (as2) was little buggy :frowning: i always had problems with it.
Final - you need to embed the font.

btibia out:thumb2: