I'm listening for MOUSE_MOVE events.
They are sent and received just fine unless the middle mouse button is held down. I don't get any more MOUSE_MOVE events until the middle button is released.
Is this an issue with Flash, or something to do with my specific mouse/computer configuration (bluetooth Mighty Mouse on Lion)?
Are there any known workarounds?
Here is a sample project to demonstrate the problem.
Left click and drag traces mouse move events, but middle click only shows middle mouse down and middle mouse up.
import flash.events.MouseEvent;
this.stage.addEventListener(MouseEvent.MIDDLE_MOUSE_DOWN, onMiddleMouseDown);
this.stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
function onMiddleMouseDown(e:MouseEvent):void {
trace("middle down");
this.stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
this.stage.addEventListener(MouseEvent.MIDDLE_MOUSE_UP, onMiddleMouseUp);
}
function onMouseMove(e:MouseEvent):void {
trace("mouse move");
}
function onMiddleMouseUp(e:MouseEvent):void {
trace("middle up");
this.stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
this.stage.removeEventListener(MouseEvent.MIDDLE_MOUSE_UP, onMiddleMouseUp);
}
function onMouseDown(e:MouseEvent):void {
trace("down");
this.stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
this.stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
}
function onMouseUp(e:MouseEvent):void {
trace("up");
this.stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
this.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);
}
UPDATE:
It appears that the mouse position (mouseX and mouseY properties) are not being updated when the middle button is held down. I'd still like to know why, or if there is a workaround for this.