Avatar

Level 2

This is working:

override protected function onMouseMove(p_evt:MouseEvent):void

{

     if (_inactivityTimer) {

          _inactivityTimer.stop();

          _inactivityTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onInactivity);

          _inactivityTimer = null;

     }

     if (_areaRect) {

          var mousePt:Point = new Point(mouseX, mouseY);

          if (_areaRect.containsPoint(mousePt)) {

               // We're still in the pane area.

               if (!_pointTimer.running) {

                    sendMyCursor();

               }

           } else /*if (_pointTimer.running) removed */ {

               _pointTimer.reset(); /* added */

               // We're outside.

               removeMyCursor();

          }

     }

}

I just always reset _pointTimer.reset when mouse is outside.