title: ActionScript3. The screen auto change after a time
body: <p>I'm newbie in AS3 and have a stuck while coding pause and un-pause.
  At the frame 20</p>
  
  <pre><code>    stage.frameRate=0;
      stage.addEventListener(KeyboardEvent.KEY_UP, wait);
  function wait(event:KeyboardEvent)
  {
          if(event.keyCode == 40)
          {
              //Resume pause by return framerate = 20
              stage.frameRate = 20;
              event.currentTarget.removeEventListener(KeyboardEvent.KEY_UP,wait);
          }
  }
  </code></pre>
  
  <p>I dont' know why after wait about 10 second, this screen contain this code automatic change to frame 21</p>