I've just updated to flash player 11.2 which allows for listening to MouseEvent.RIGHT_MOUSE_UP and MouseEvent.RIGHT_MOUSE_DOWN.
I am having a problem where these events don't act the same as their MOUSE_UP / MOUSE_DOWN counterparts. Specifically, the MOUSE_UP event is launched no matter where the mouse is. This allows for dragging outside the flash window and still having a complete down -> up event loop whenever a user clicks in the flash player.
However, this does not seem to be the case for RIGHT_MOUSE_UP / DOWN. When I right click inside the player and release outside of the player, I don't get a RIGHT_MOUSE_UP event meaning it is possible to receive multiple RIGHT_MOUSE_DOWN events without receiving an UP event.
Is there a known workaround to this or is there an option I must set?
Edit :
Here is a code example :
stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
stage.addeventListener(MouseEvent.RIGHT_MOUSE_UP, onRightMouseUp);
stage.addeventListener(MouseEvent.RIGHT_MOUSE_DOWN, onRightMouseDown);
//...
//all callback function follow a similar format as :
private function onMouseUp(e : MouseEvent) : void
{
leftClick_ = false;//signaling that leftClick is not pressed
}
RIGHT_MOUSE_UP
listener to theStage
as that's very important. – xLite