how to reset timer back to zero?
Good day people,
how to reset timer back to zero?
I have a button in the parent timeline of the code below and when I click it I want the behavior of the time will go back to 1 or 0.
Button clicked, timer back to 1 or 0.
-----------------------------------
contents_mc - timer_txt
-----------------------------------
_root.elapseTime = 0;
intervalId = setInterval(this,"countDown",1000);
function countDown(){
if(_root.timerOn){
_root.elapseTime++;
_time = _root.elapseTime + " Sekunden";
if(_root.elapseTime == 10){
_parent.gotoAndStop("GameOutOfTime");
clearInterval(intervalId);
}
}
}
stop();
Any reply will be appreciated,
Thanks