title: AS 3 Flash Countdown Timer For Game Over Screen
body: <p>I am currently in a Flash game programming class with action script 3 and can't seem to find a clock anywhere that counts down and then does an action. I've been using Lynda tutorials and that hasn't been helpful and I have also Google searched quite a bit, but no luck. I have a Countdown clock and have been try "if" statements, but no luck.</p>
  
  <p>Can someone guide me in the right direction on what I am doing wrong?</p>
  
  <pre><code> //game timer
  
   var count:Number = 60; // amount of time 
  
   var myTimer:Timer = new Timer(1000,count); // time in ms, count is calling from line above
  
   myTimer.addEventListener(TimerEvent.TIMER, countdown);
  
   myTimer.start();
  
   function countdown(event:TimerEvent):void
   {
       myText_txt.text = String((count)-myTimer.currentCount); //dynamic txt box shows current count 
   }
  
  
   //if and else if statements
  
   if (((count)-myTimer.currentCount) == 58)
   {
       gotoAndStop(2);
   }
  </code></pre>