Hello,
i have a timer that counts down to zero when selected then advances the main timeline.
I would like it to repeat this action when the button is clicked again but the timer only works once.
Here is the code:
var timerCount=4; // This is the variable set for the timer display
var tCounter=setInterval(timer, 1000); //1000 will run the timer every 1 second
function timer()
{
timerCount=timerCount-1;
if (timerCount <= -1)
{
sym.getComposition().getStage().getSymbol("set_1").play();
return;
}
sym.getSymbol("timer_sym").$("timer_txt").html(timerCount); // Display the timer value
}
Any suggestions?
Thanks