I just updated flash player 11.2, which allows you to listen to MouseEvent.RIGHT_MOUSE_UP and MouseEvent.RIGHT_MOUSE_DOWN.
I had a problem when these events do not act in the same way as their MOUSE_UP / MOUSE_DOWN. In particular, the MOUSE_UP event is fired regardless of where the mouse is located. This allows you to drag outside the flash memory window and still have a full cycle of going down → up whenever a user clicks on a flash player.
However, this is not like RIGHT_MOUSE_UP / DOWN. When I right-click inside the player and go beyond the player, I do not receive the RIGHT_MOUSE_UP event, which means that you can receive several RIGHT_MOUSE_DOWN events without receiving the UP event.
Is there a known workaround for this, or is there an option I have to install?
Edit:
Here is a sample code:
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 }
source share