I have read through most of the numerous posts relating to this topic (and there are quite a few) but I am still unable to solve my problem. I have a simple AS2 script:
var theXML:Array = new Array();
var XMLtoLoad:XML = new XML();
XMLtoLoad.ignoreWhite = true;
XMLtoLoad.onLoad = function(success) {
theXML=XMLtoLoad.childNodes[0].childNodes;
};
XMLtoLoad.load("example.xml");
function loadText(){
var theText:String = theXML[0].firstChild.nodeValue;
this.createTextField("my_txt", 10, 75, 200, 1000, 22);
my_txt.text = theText;
my_txt.autoSize = true;
my_txt.multiline = true;
my_txt.selectable = false;
my_txt.wordWrap = false;
my_txt.embedFonts = true;
my_txt.html = true;
my_txtFormat = new TextFormat();
my_txtFormat.font = "my_font";
my_txtFormat.size = 13;
my_txt.setTextFormat(my_txtFormat);
}
Here is my xml:
<example>
<text><![CDATA[see google <a href="http:google.com>here</a>]]></text>
</example>
Unfortunately (unless I am missing the concept of CDATA in xml) my text is rendered in flash as:
see google <a href="http:google.com>here</a>
My ultimate goal is to generate text in flash that is generated from xml and that have a link to external urls. I do not have much experience with xml in flash, i have been looking online but can't seem to figure out what to do. Any ideas?