# More AS2 and XML issues!

**URL:** <https://forum.kirupa.com/t/more-as2-and-xml-issues/258577>\
**Category:** programming\
**Created:** [April 25, 2008, 11:27am UTC](https://forum.kirupa.com/t/more-as2-and-xml-issues/258577 "2008-04-25T11:27:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reverend](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@Reverend](https://forum.kirupa.com/u/Reverend)\
**Post date:** [April 25, 2008, 11:27am UTC](https://forum.kirupa.com/t/more-as2-and-xml-issues/258577/1 "2008-04-25T11:27:44Z")

</div>

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?
