The spark Application container in Flex purportedly listens to the rightMouseUp and other right mouse button events. However, if press and release the right mouse button in the Flash player I only get the context menu.
How can I disable the context menu and make the application listen to right mouse button events instead?
Minimal example:
<?xml version="1.0"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
mouseUp="onMouseUp(event)"
rightMouseUp="onRightMouseUp(event)"
>
<fx:Script>
<![CDATA[
import mx.controls.Alert;
private function onMouseUp(e:MouseEvent):void {
Alert.show('left mouse up');
}
private function onRightMouseUp(e:MouseEvent):void {
Alert.show('right mouse up');
}
]]>
</fx:Script>
</s:Application>