3 Replies Latest reply on Mar 3, 2013 6:31 AM by Ned Murphy

    Stop Timer In Following Frame


      Hi everyone,

      I am trying to make a simple survival game where the score continuously increases until the player is hit. Once the player is hit, we move on to the next frame (frame 2). This frame contains a "Game Over" message and the player's final score. My problem is that my function keeps running when I move to the game over screen. I was trying to write something along the lines of "if current frame equals 2, stop timer" but I can't seem to get it to work. Instead of staring at my code for hours trying to figure it out, I figured I'd ask here because I'm sure this is a fairly simple thing to do. Here is the code for my score (timer) function:

      timer = 0;

      countup = function(){



      countupInterval = setInterval(countup,100);

      Thanks in advance!