How to STOP a timer in PROGRESS in the background?

Hi guys,

Finally I was able to get my site running with a little FLASH ACTIONSCRIPT in it. (all courtesy of KIRUPA.com)
I got so excited and published it right away 'cause I think for as a photographer, it’s a huge accomplishment on my part LOL.

Okay here is my problem. In my main movie, there are 3 BUTTONS namely: Portfolio, About me, and Contact.
In the main timeline I added this script below


stop();
delay = 30000;
intervalID = setInterval(pause, delay);
function pause() {
   clearInterval(intervalID);
   gotoAndPlay("rewind");
}

filename = ["photo01.swf", "photo02.swf", "photo03.swf", "photo04.swf", "photo05.swf", "photo06.swf", "photo07.swf", "photo08.swf", "photo09.swf"];
path = "http://www.allanrestaurophotography.com/swf/";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], movieTarget);


btn_portfolio.onRelease = function() {
	subnavigation_mc.gotoAndPlay("show");
	gotoAndStop("firststop");
};


btn_aboutme.onRelease = function() {
	this.movieTarget.loadMovie("swf/dummy.swf");
	subnavigation_mc.gotoAndStop("hide");
	gotoAndStop("aboutme");
};


btn_contact.onRelease = function() {
	this.movieTarget.loadMovie("swf/dummy.swf");
	subnavigation_mc.gotoAndStop("hide");
	gotoAndStop("mailer");
};


if you notice it, there is a 30 second timer set to purposely move the playhead back to “rewind” and load the RANDOM SCRIPT again. The problem comes whenever you click on either ABOUT ME or CONTACT, because once you are in those frame, the timer will bring you back at “rewind” naturally. hehehehehehe

I tried to search for some way to stop the timer when pressing ABOUT ME and CONTACT but haven’t seen one yet. Can someone share something about this please :slight_smile:

Peace!