# Skipping problems loading multiple XML Photo Slideshows

**URL:** <https://forum.kirupa.com/t/skipping-problems-loading-multiple-xml-photo-slideshows/190973>\
**Category:** flash\
**Created:** [June 16, 2006, 1:27am UTC](https://forum.kirupa.com/t/skipping-problems-loading-multiple-xml-photo-slideshows/190973 "2006-06-16T01:27:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stewplazar](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@stewplazar](https://forum.kirupa.com/u/stewplazar)\
**Post date:** [June 16, 2006, 1:27am UTC](https://forum.kirupa.com/t/skipping-problems-loading-multiple-xml-photo-slideshows/190973/1 "2006-06-16T01:27:07Z")

</div>

I am having skipping problems loading movie clips into a container MC. Each MC has a series of images (I used the XML posted on [kirupa.com](http://kirupa.com)). I created buttons that load new movies into the container MC. Do I need to unload the MC that is there, and then load the new one? Do I need to do anything else (is this a clear/Set Interval problem?)

## Here is the code for one of the loaded movie clips. I laod this on the first frame using: container.loadMovie(“amsterdam.swf”);

delay = 4000;  
//-----------------------  
clearInterval(myInterval);  
////--------------  
function loadXML(loaded) {  
if (loaded) {  
xmlNode = this.firstChild;  
image = [];  
description = [];  
total = xmlNode.childNodes.length;  
for (i=0; i\<total; i++) {  
image\* = xmlNode.childNodes\*.childNodes[0].firstChild.nodeValue;  
description\* = xmlNode.childNodes\*.childNodes[1].firstChild.nodeValue;  
}  
firstImage();  
} else {  
content = “file not loaded!”;  
}  
}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“amsterdam.xml”);  
p = 0;  
this.onEnterFrame = function() {  
filesize = picture.getBytesTotal();  
loaded = picture.getBytesLoaded();  
preloader.\_visible = true;  
if (loaded != filesize) {  
preloader.preload\_bar.\_xscale = 1000\*loaded/filesize;  
} else {  
preloader.\_visible = false;  
if (picture.\_alpha\<100) {  
picture.\_alpha += 10;  
}  
}  
};  
function nextImage() {  
if (p\<(total-1)) {  
p++;  
if (loaded == filesize) {  
picture.\_alpha = 0;  
picture.loadMovie(image[p], 1);  
desc\_txt.text = description[p];  
picture\_num();  
slideshow();  
}  
}  
}  
function prevImage() {  
if (p\>0) {  
p–;  
picture.\_alpha = 0;  
picture.loadMovie(image[p], 1);  
desc\_txt.text = description[p];  
picture\_num();  
}  
}  
function firstImage() {  
if (loaded == filesize) {  
picture.\_alpha = 0;  
picture.loadMovie(image[0], 1);  
desc\_txt.text = description[0];  
picture\_num();  
slideshow();  
}  
}  
function picture\_num() {  
current\_pos = p+1;  
pos\_txt.text = current\_pos+" / "+total;  
}  
function slideshow() {  
myInterval = setInterval(pause\_slideshow, delay);  
function pause\_slideshow() {  
clearInterval(myInterval);  
if (p == (total-1)) {  
p = 0;  
firstImage();  
} else {  
nextImage();  
}  
}  
}  
stop();

–  
Then I have a series of buttons to load different slideshows, with the action below:

on (press) {  
loadMovie(“rome.swf”,“container”);  
}

any help??
