# Preloader for my xml file

**URL:** <https://forum.kirupa.com/t/preloader-for-my-xml-file/248395>\
**Category:** Uncategorized\
**Created:** [January 7, 2008, 10:23pm UTC](https://forum.kirupa.com/t/preloader-for-my-xml-file/248395 "2008-01-07T22:23:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![modulater](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@modulater](https://forum.kirupa.com/u/modulater)\
**Post date:** [January 7, 2008, 10:23pm UTC](https://forum.kirupa.com/t/preloader-for-my-xml-file/248395/1 "2008-01-07T22:23:42Z")

</div>

Hi there,

Is there anybody that can help me how to make a preloader for this xml gallery.I can’t seem to find the answer to preload the multiple pic’s at once.

note:  
main is the (empty)mc on stage. project is an mc that’s attached form the library. In the project mc there’s an mc called holder where the pic’s are loaded.

here’s the code:

my\_xml.ignoreWhite = true;  
my\_xml.load(“slides.xml”);  
my\_xml.onLoad = function(succes) {  
if (succes) {  
data\_xml = this.firstChild.childNodes;  
rootNode = my\_xml.firstChild;  
totalSlides = rootNode.childNodes.length;  
w = 0;  
for (i=0; i\<\_root.totalSlides; i++) {  
\_root.main.attachMovie(“project”, [“project”+i], i, 0, 0, 0);  
\_root.main[“project”+i].\_x = w;  
\_root.main[“project”+i].\_y = 0;  
w += \_root.main[“project”+i].\_width  
\_root.main[“project”+i].i = i;  
loadMovie(data\_xml\*.attributes.thumb, \_root.main[“project”+i].holder);  
};  
w2 = 0;  
for (j=0; j\<\_root.totalSlides; j++) {  
\_root.main.attachMovie(“btn”, [“btn”+j], j+i, 0, 0, 0);  
\_root.main[“btn”+j].\_x = w2;  
\_root.main[“btn”+j].\_y = 0;  
w2 += \_root.main[“btn”+j].\_width+144; h += \_root.main[“project”+i].\_height+15; \_root.main[“btn”+j].j = j; }

Big thx in advance. Grtz
