Hi
I am trying to get a link to work in the body text of a text block.
I am using CDATA but can not get this to translate to html in the flash. I have checked that the ‘Render text as html’ box is checked.
What is it that I am not doing? or not doing right?
Below is my AS and below that is my XML
========================
xml menu stripped down
function CreateMenu(menu_xml) {
var items = menu_xml.firstChild.firstChild.childNodes;
for (var i = 0; i < items.length; i++)
{
if (items*.attributes.type == “news”)
{
var header = items*.firstChild;
var article = items*.childNodes[1];
var item_mc = menu_mc.attachMovie(“menu_item”, “item” + item_count, item_count);
item_mc._y = item_count * item_spacing;
item_count++;
item_mc.header_txt.text = header.firstChild.nodeValue; //
item_mc.main_mc.content_text = article.firstChild.nodeValue; // this is the content but is I use htmlText it throws an error
item_mc.main_mc.onRelease = DisplayInfo;
}
}
}
var news_xml = new XML();
news_xml.ignoreWhite = true;
news_xml.onLoad = function(success) {
if (success)
{
CreateMenu(this);
}
else
{
trace(“Error loading XML file”);
}
};
news_xml.load(“news_url.xml”);
===================
xml file below
<?xml version=“1.0” encoding=“utf-8”?>
<menu>
<menuitems>
<item type=“news”>
<header>Heading</header>
<article><![CDATA[Some <br>text here<br><font size=“16” color="#999999">And some text <a href=“http://www.website.com” target="_blank"><b>here</b></a></font> <img src=“any.jpg”/>]]></article>
</item>
</menuitems>
</menu>