if that code is causing the _root timeline to go to the wrong frame, it's because either _root isn't what you think it is or you have no single "GameOver" frame label on your _root timeline. (use Movie Explorer to check your frame labels.)
to pause your timer, use:
to restart your timer, use:
countdownInterval = setInterval(countdown,1000);
I've tried looking at my frame labels and they seem correct. When I take the _root from it the timer just stays at 0 and doesn't move to another frame. Also how would I use the:
on one of the collectables because I don't think I'm using the actionscript correctly it will pick up the collectable but the timer just carries on...
1 person found this helpful
you just need to execute:
when you pick up an object. you must have some kind of loop that probably checks a hittest between your character and the objects. that's where you would add the clearInterval.
attach a screenshot showing your frame label (in the properties panel).
also, if you have more than one scene, make sure you're not testing scenes (test movie) when you test that goto/