Hi all
I’m having a problem pulling in a single image using XML:
AS2 :
[COLOR=DarkRed]**function contents() {
var cont: XML = new XML ;
cont.ignoreWhite = true;
cont.onLoad = function(success) {
if (success) {
theText.titleText.htmlText = this.childNodes0.firstChild.nodeValue;
theText.textText.htmlText = this.childNodes1.firstChild.nodeValue;
mainPic.mainImage.loadMovie(this.childNodes2.first Child.nodeValue);
}
};
cont.load ( “xml/home.xml” ) ;
}**[/COLOR]
This works fine -on my PC. But when I try to ‘simulate download’ or if I actually upload it to test it, the image isn’t loading.
I’m guessing that this is because by the time Flashplayer parses the XML data into my Movie, the image still isn’t loaded. So therefore when the movie stops playing at Frame2 the image may well have loaded but there’s now no instruction of where to put it. But then, that is just my guess.
Can anyone help? please?