# Preload Images in XML File

**URL:** <https://forum.kirupa.com/t/preload-images-in-xml-file/180579>\
**Category:** flash\
**Created:** [March 1, 2006, 5:12pm UTC](https://forum.kirupa.com/t/preload-images-in-xml-file/180579 "2006-03-01T17:12:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![coertli](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@coertli](https://forum.kirupa.com/u/coertli)\
**Post date:** [March 1, 2006, 5:12pm UTC](https://forum.kirupa.com/t/preload-images-in-xml-file/180579/1 "2006-03-01T17:12:04Z")

</div>

How can I have only one loading screen at the beginning of my movie that will load the entire movie including images I have in an XML file that I load. I have a XML file that has 20 pictures in it, and I want all of the pictures to load before, so that when transitioning between pics, there is no delay. Here is how I loaded my XML file:

```auto
pArray=new Array();
my_xml=new XML();
my_xml.ignoreWhite=true;
my_xml.onLoad = function(success){
 if(success){
  for(var i=0; i<this.firstChild.childNodes.length; i++){
   pArray_l = this.firstChild.childNodes.length;
   pArray.push(this.firstChild.childNodes*.attributes.pic);
  }
 }
 load_home();
};
my_xml.load("pic.xml");

```
