I have a counter on a game that counts down to 0 then moves
onto the next frame (the game over frame). There is a button on
this frame (the game over frame) that lets the user go back and
play again. This is where the porblem occurs. Once they click to go
back and play again the setInterval count down timer is messed up
and counts down at random speeds...i have a clearInterval on the
game over frame and also one in the code of the game that says, if
such and such happens go to and play ("game over").
have you declared the myCounter as number ??
When you are declaring the id for setInterval , you have set
var myCounter:Number; (Dont declared with any
and also make sure the loop reaches the if
you don't need to defined myCounter's data type. but shoud
use clearInterval(myCounter) in the line above your setInterval()
statement and you need to initalize timer each time your