Stalling a timer?

Hi,

I’m tyring to do something a little complicated and I was hoping for some expertise!

I’m using a timer which triggers a gotoAndPlay after 5 secs. It works fine but I am now trying to work out if it is possible that if I press a button I would be able to stall the timer. i.e the goToAndPlay only happens after 5 sec otherwise the it is prevented and the the timer goes back to zero.

I know its a bit difficult to describe but I have attatched the .fla to help you see what I mean.

In terms of the code I’m using:

I have the function:

[color=blue]stop();
function pause(){
//play();
gotoAndStop(21);
clearInterval(timer);
};[/color]
[color=blue][color=black]This function is called when the playhead hits a certain frame:[/color][/color]
[color=blue][color=#000000]i.e.[/color][/color]
[color=blue][color=#000000][/color][/color]
[color=blue]stop();[/color]
[color=blue]timer = setInterval(pause, 3000);

[/color]If anyone has a clue what I’m talking about and can help I’d really apprectiate it!

Thanks Rache:q: :smirk: