The code is not sufficient. You should at least explain where it is : in your button.click event handler ?
You could also make a ZIP of your project available on a service like www.box.com (where you can create a free account) and post the link.
Just add this line at the end of your Code to make it works again
1 person found this helpful
1) You could avoid any interval by making the countdown animation in a symbol countdDown.
Three states => three points in the timeline labelled wait, count and start.
The stage symbol has its autoplay property set to false, so the headline stops at wait.
goBtn.click event handler : sym.stop('count');
The countDown symbol alos has its autoplay property set to false. A play command is inserted at count (see the arrow on white rectangle in the screen shot).
At the end of the animation, in the symbol's timeline there is a trigger to start the main animation :
againBtn.click event handler : sym.stop('wait');
2) With an interval, modifying the timing is just a matter of changing values in the code (in the first case you would have to edit the countdDown timeline).
The structure remains, with the same three states.
There is now a trigger at count in the main timeline (see the orange diamond in the screen shot). As Zaxist says, clear your interval when finished :
timerCount = 5;
tCounter = setInterval( timer, 1000);
timerCount -= 1;
if (timerCount < 1)
Downloadable examples here : https://app.box.com/s/cmjmr01802p8k1tgcmhk