I know this is a much talked about issue, but I still don’t find a workable solution. What I want to do is show some text with html markup in flash, using a xml file as source. I know I have to encapsulate the (html) text in the CDATA, but when I take a look at my flash, I see the html tags are shown as well. So instead of showing ‘this is a bold text’ I get 'this is a <b>bold</b> text.
I use the following xml:
<pic type="category"> <thumb>thumblocation.jpg</thumb> <image>imagelocation.jpg</image> <title>Picture</title> <descr> <![CDATA[This is a <b>bold</b> text.]]> </descr> <download filename="Filename.jpg" filetype="jpg" filesize="0kb">download.jpg</download> </pic>
In flash, I use the following code:
PORTFOLIO_descr* = xmlNode.childNodes*.childNodes.firstChild; _root.MCI_wrapper.TXT_descr.html = true; _root.MCI_wrapper.TXT_descr.wordWrap = true; _root.MCI_wrapper.TXT_descr.multiline = true; _root.MCI_wrapper.TXT_descr.htmlText = PORTFOLIO_descr*;
When I trace the content of ‘PORTFOLIO_descr*’, I can see al the special characters are replaced with their corresponding code (< becomes < etc.), should I try and replace them stringwise?
Thank in advance!