# Sequentially preload images from XML data

**URL:** <https://forum.kirupa.com/t/sequentially-preload-images-from-xml-data/245533>\
**Category:** flash\
**Created:** [November 30, 2007, 5:16pm UTC](https://forum.kirupa.com/t/sequentially-preload-images-from-xml-data/245533 "2007-11-30T17:16:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![amal\_auc](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@amal\_auc](https://forum.kirupa.com/u/amal_auc)\
**Post date:** [November 30, 2007, 5:16pm UTC](https://forum.kirupa.com/t/sequentially-preload-images-from-xml-data/245533/1 "2007-11-30T17:16:16Z")

</div>

Hello,

Am stuck and need some help. My situation is as follows :

I have an XML from which I get some urls passed into flash. (urls are path to images)  
And I have 3 movieclips sitting on the stage waiting to hold the images.

I need to preload all the 3 images on the first frame of my movie before it starts playing.  
All I have been able to do is this :  
////////////////////////////////////////////////////////////////////////  
upComing = new XML();  
upComing.ignoreWhite = true;  
upComing.load(“xml/hupcoming.xml”);  
upComing.onLoad = function(success) {  
image = [];  
xmlNode = this.firstChild;  
totalNumImages = xmlNode.childNodes.length;  
for (i=0; i\<totalNumImages; i++) {  
image\* = xmlNode.childNodes\*.childNodes[0].firstChild.nodeValue;

```
}
trace(image[0]);
trace(image[1]);
trace(image[2]);

```

};  
////////////////////////////////////////////////////////////////////////  
var imgHolders:Array = [holder1, holder2, holder3];

I have been looking at the MovieClipLoader but cant figure it out.

Anyone around who can help me complete this.

Thanks.\*\*
