# XML Slideshow Photogallery setInterval/clearInterval

**URL:** <https://forum.kirupa.com/t/xml-slideshow-photogallery-setinterval-clearinterval/173566>\
**Category:** flash\
**Created:** [December 27, 2005, 1:59pm UTC](https://forum.kirupa.com/t/xml-slideshow-photogallery-setinterval-clearinterval/173566 "2005-12-27T13:59:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmcdog74](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@jmcdog74](https://forum.kirupa.com/u/jmcdog74)\
**Post date:** [December 27, 2005, 1:59pm UTC](https://forum.kirupa.com/t/xml-slideshow-photogallery-setinterval-clearinterval/173566/1 "2005-12-27T13:59:10Z")

</div>

I’m using a version of XML Slideshow Photogallery that loads slideshow.swf (and other pages) into master.swf

It plays good the first time through and when I trace myInterval, I can see it increment 1,2,3 … with each slide.

When I go to another page and then come back to the slideshow - the myInterval will skip a couple or I get 2 values at the same time. This causes the slideshow to display every other image (or every 3, etc)

I can see that the problem is from not clearing the myInterval variable properly.

the clearInterval(myInterval); function seems to just clear the last instance created  
Is there a way to clear all instances?

[christinemorgandesigns.com](http://christinemorgandesigns.com) (click on Black & White to see slideshow)
