# Combining Kirupa photo Tutorials and I have a question

**URL:** <https://forum.kirupa.com/t/combining-kirupa-photo-tutorials-and-i-have-a-question/200728>\
**Category:** random\
**Created:** [September 14, 2006, 3:29pm UTC](https://forum.kirupa.com/t/combining-kirupa-photo-tutorials-and-i-have-a-question/200728 "2006-09-14T15:29:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zachstevedave](https://avatars.discourse-cdn.com/v4/letter/z/d07c76/32.png) [@zachstevedave](https://forum.kirupa.com/u/zachstevedave)\
**Post date:** [September 14, 2006, 3:29pm UTC](https://forum.kirupa.com/t/combining-kirupa-photo-tutorials-and-i-have-a-question/200728/1 "2006-09-14T15:29:11Z")

</div>

I think someone here could probably answer this fairly easily. I think my brain just isn’t seeing an easy solution, and i’m sure there is an easy one. I created a flash photo gallery that has the thumbnail gallery below, as per the tutorials. I added the slideshow code from the slideshow tutorial and linked it to a button. I click the button and it works great, but how do I make the same button stop the slideshow action. Here are chunks of the code, it should all look pretty similar to what is already on the tutorial.  
**This is the button code.**  
slideshowit.onRelease = function()  
{  
slideshow();  
}

**This is where i set the delay and created the slideshow function**  
delay = 3000;

function slideshow()  
{  
myInterval = setInterval(pause\_slideshow, delay);  
function pause\_slideshow()  
{  
clearInterval(myInterval);  
if (p == (total-1))  
{  
p = 0;  
firstImager();  
} else {  
nextImager();  
}  
}  
}  
**These are the functions nextImager and firstImager**  
function firstImager() {  
if (loaded == filesize) {  
picture.\_alpha = 0;  
picture.loadMovie(image[0], 1);  
desc\_txt.text = description[0];  
picture\_num();  
slideshow();  
}  
}

function nextImager()  
{  
if (p\<(total-1)) {  
p++;  
if (loaded == filesize) {  
picture.\_alpha = 0;  
picture.loadMovie(image[p], 1);  
desc\_txt.text = description[p];  
picture\_num();  
slideshow();  
}  
}  
}

What do I need to add to make that slideshowit turn off? Thanks for any help.
