I've done this many times before - now I've worked on this for hours and I just can't figure out what's wrong this time.
This is my AS:
Code:
myText.html = true;
myText.autoSize = true;
var mydata = new XML();
mydata.ignoreWhite = true;
mydata.load("kontakt.xml");
mydata.onLoad = process;
function process (success) {
if (success) {
trace(mydata.firstChild);
myText.htmlText = mydata.firstChild;
} else {
trace("bad");
}
}
This is my XML:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<data><![CDATA[<img src='krak.jpg'>]]></data>
The trace comes up with:
Code:
<data><img src='krak.jpg'></data>
...but the output is just the HTML code:
<img src='krak.jpg'>
..instead of showing the image. What's going on ?