title: Event flow in AS3 - Shoot a bullet
body: <p>My goal is to shoot a bullet everytime I click on ship. What happens, in fact, is that If I click on it once, the bullet is shot, but if I click on it twice before the first bullet is off the screen, the first bullet literally stops(it does not disappear, only stops) and the second bullet is shot.</p>
  
  <pre><code>public var ship:Ship = new Ship();
  public var bullet:Bullet = new Bullet();
  
  stage.addChild(ship);
  
  
  ship.addEventListener(MouseEvent.CLICK, shoot);
  
  function shoot(e:MouseEvent):void
  { 
  
    stage.addEventListener(Event.ENTER_FRAME, bulletflies);
  
  }
  
  function bulletflies(e:Event):void
  {
  
    stage.addChild(bullet);
    bullet.y -= 5; 
  }
  </code></pre>