Restarting Interval

hi everyone,

got a bit of a question with setInterval();

My Interval is working. But I have a button so that when you click it, it clearIntervals(); etc. But when you click it again, I need it to restart the interval. Which is not happening…

here is my as:


btn.onRelease = function() {
	if (pressed == 0) {
		menu.signBtn._visible = true;
		fader(menu,100);
		pressed = 1;
		clearInterval(iid);
		trace("cleared: "+iid);
	} else if (pressed == 1) {
		fader(menu,0);
		menu.signBtn._visible = false;
		pressed = 0;
		var iid = setInterval(this, "image", duration);
		trace("new: "+iid);
	}
};

menu.signBtn.onRelease = function() {
	getURL("../signUp.html", "_blank");
};

var iid = setInterval(this, "image", duration);

Now, to me it looks fine, but it won’t re-initiate the setInterval…I’m just not quite sure what to do at the moment…

Any tips and advice would be much appreciated.

Cheers,