# Flash Mx Slideshow

**URL:** <https://forum.kirupa.com/t/flash-mx-slideshow/274598>\
**Category:** flash\
**Created:** [October 31, 2008, 10:20pm UTC](https://forum.kirupa.com/t/flash-mx-slideshow/274598 "2008-10-31T22:20:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![prontoflash](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@prontoflash](https://forum.kirupa.com/u/prontoflash)\
**Post date:** [October 31, 2008, 10:20pm UTC](https://forum.kirupa.com/t/flash-mx-slideshow/274598/1 "2008-10-31T22:20:53Z")

</div>

Hi all, i’m trying to modify the slideshow for multiple xml gallery.  
I have the code on the first frame and I want to load another xml (aria.xml) ,but if I use

on(release){  
xmlData.load(“aria.xml”);  
}

it work but not well, the loop crash.  
How I do this?

Thank you!

function loadXML(loaded)  
{  
if (loaded)  
{  
xmlNode = this.firstChild;  
image = [];  
link = [];  
total = xmlNode.childNodes.length;  
for (i = 0; i \< total; i++)  
{  
image\* = xmlNode.childNodes\*.childNodes[0].firstChild.nodeValue;  
link\* = xmlNode.childNodes\*.childNodes[1].firstChild.nodeValue;  
//trace(link\*);  
} // end of for  
firstImage();  
}  
else  
{  
content = “file not loaded!”;  
} // end else if  
} // End of the function  
function fadeIn()  
{  
onEnterFrame = function ()  
{  
filesize = picture.getBytesTotal();  
loaded = picture.getBytesLoaded();  
preloader.\_visible = true;  
if (loaded != filesize)  
{  
preloader.preload\_bar.\_xscale = 100 \* loaded / filesize;  
}  
else  
{  
preloader.\_visible = false;  
if (picture.\_alpha \< 100)  
{  
picture.\_alpha = picture.\_alpha + 5;  
}  
else  
{  
delete onEnterFrame;  
slideshow();  
} // end else if  
} // end else if  
};  
} // End of the function  
function fadeOut()  
{  
onEnterFrame = function ()  
{  
if (picture.\_alpha \> 5)  
{  
picture.\_alpha = picture.\_alpha - 5;  
}  
else  
{  
picture.\_alpha = 0;  
delete onEnterFrame;  
nextImage();  
} // end else if  
};  
} // End of the function  
function nextImage()  
{  
if (p \< total - 1)  
{  
++p;  
picture.\_alpha = 0;  
if (loaded == filesize)  
{  
picture.loadMovie(image[p], 1);  
picture\_num();  
fadeIn();  
} // end if  
} // end if  
} // End of the function  
function firstImage()  
{  
init = true;  
picture.\_alpha = 0;  
picture.loadMovie(image[0], 1);  
picture\_num();  
fadeIn();  
} // End of the function  
function picture\_num()  
{  
current\_pos = p + 1;  
pos\_txt.text = current\_pos + " / " + total;  
} // End of the function  
function slideshow()  
{  
function pause\_slideshow()  
{  
clearInterval(myInterval);  
if (p == total - 1 && !init)  
{  
p = 0;  
firstImage();  
}  
else if (p == total - 1 && init)  
{  
p = -1;  
fadeOut();  
}  
else  
{  
fadeOut();  
} // end else if  
} // End of the function  
myInterval = setInterval(pause\_slideshow, delay);  
} // End of the function  
var delay = 5000;  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“images.xml”);  
p = 0;
