title: AS3 Mouse_Over Getting Stuck
body: <p>I have many buttons being populated on the stage. They are all movieclips with an on and off state on frame one and 2. The problem is when you mouse over the buttons quickly sometimes it gets stuck on the over state. Is there something i am missing? </p>
  
  <pre><code>public class SimpleRollOverButton extends MovieClip
  {
      private var _selected:Boolean;
  
      public function SimpleRollOverButton()
      {
          // EVENTS
          this.addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
          this.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
          this.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
  
          enable();
  
  
      }
      //
      // PUblic functions
      //
      public function enable():void
      {
  
          this.selected = false;
          this.gotoAndStop(1);
          this.mouseEnabled = this.mouseChildren = true;
          this.buttonMode = true;
  
  
      }
      public function disable():void
      {   
  
          this.mouseEnabled = this.mouseChildren = false;
          this.buttonMode = false;
      }
      public function onState():void
      {
          this.disable();
          this.selected = true;
  
          this.gotoAndStop(2);
  
      }
      public function offState():void
      {
          this.enable();
      }
  
      //
      // Private Functions
      //
      protected function onClick(e:MouseEvent):void
      {
          onState();
      }
      protected function onMouseOver(e:MouseEvent):void
      {
          this.gotoAndStop(2);
      }
      protected function onMouseOut(e:MouseEvent):void
      {
          this.gotoAndStop(1);    
      }
  
      //
      // ACCESSORS
      //
      public function get selected():Boolean
      {
          return _selected;
      }
  
      public function set selected(value:Boolean):void
      {
          _selected = value;
      }
  
  
  }
  </code></pre>