Please help! how to clearinterval

Hi, please can anyone help me with this…:m: slide show.

:stare: it looks like the problem is that the interval has not been clear so every time i click away from my slide show (for example navigate to my contact swf) and then come back to the slide show the pictures keep looping on top of each other and fading at the wrong times too.

Does anyone know how to do it?:angel:

Ill preciate any help… couse my face starts looking like this :stare:…

this is the code, from one of the kirupa tutorials.

var id, current;
var k = 0, p = 0;
var slide = 1;
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;
}
id = setInterval(preloadPic, 100);
} else {
content = “file not loaded!”;
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“images/galeria/slides/galeria.xml”);
function preloadPic() {
clearInterval(id);
var con = picture.duplicateMovieClip(“con”+k, 9984+k);
con.loadMovie(image[p]);
preloader._visible = 1;
preloader.swapDepths(con.getDepth()+3);
con._alpha = 0;
var temp = _root.createEmptyMovieClip(“temp”+k, 99+k);
k++;
temp.onEnterFrame = function() {
var total = con.getBytesTotal();
var loaded = con.getBytesLoaded();
percent = Math.round(loaded/total*100);
preloader.preload_bar._xscale = percent;
if (con._width) {
preloader._visible = 0;
con.onEnterFrame = fadeIn;
if (slide) {
id = setInterval(nextImage, 5000);
}
delete this.onEnterFrame;
}
};
}
MovieClip.prototype.fadeIn = function() {
if (this._alpha<100) {
current._alpha -= 4;
this._alpha += 4;
} else {
current._visible = 0;
current = this;
delete this.onEnterFrame;
}
};
function nextImage() {
p<total-1 ? p++ : p=0;
desc_txt.text = description[p];
picture_num();
preloadPic();
}

preloadPic();

erm I thought I responded to this…

how are you switching between pages?

(spammer)

first, thank you for your reply.
i have a menu and a loader in the main movie (main.swf ) when i click to see the slide show in the menu the movie (slideshow.swf) is loaded into the loader in the main.swf all the other movies like contact.swf and info.swf there are all loaded into the main.swf

from gazing at the code

I assume they are in thier seperate container MCs?

are there any variables which are called the same in the different swfs?

you appear to be using an onEnterFrame instead of tween class for the transistion effect, onEnterFrames are evil