1 Reply Latest reply on Apr 12, 2009 7:34 PM by kglad

    I need a actionscrip 2.0 that will make a gameover button come up after a timer reaches "0"

    jcgames

      I am currently designing a game were you click on the targets and you get points. I have a timer in the game and is set for 60 seconds. I have a button with an instant name "gameover". What i want to happen is when the the timer reaches 0 i would like the button to cover the screen. Here is the actionscript for the timer.

       

      timer = 60;
      countdown = function(){;
      timer--;
      if(timer==0){;
          clearInterval(countdownInterval);

      };
      };
      countdownInterval = setInterval(countdown, 1000);

       

      I have tried putting

       

      timer = 60;
      countdown = function(){;
      timer--;
      if(timer==0){;
          clearInterval(countdownInterval);
          _root.gameover._y;
      };
      };
      countdownInterval = setInterval(countdown, 1000);

       

      But had no luck. Thanks for the help.