Custom right click menus in AIR
I was wondering, why DisplayObjects in AIR don’t support the MouseEvent.RIGHT_CLICK Event. The only way to implement a right-click-menu seemed to be a NativeMenu. But I needed only the event, not the ugly native-os-menu.
Here is the workaround: Just create a blank NativeMenu and listen for the display event.
var menu:NativeMenu = new NativeMenu(); menu.addEventListener(Event.DISPLAYING, onRightClick, false, 0, true); someSprite.contextMenu = menu;
31. October 2007 | Posted in AIR, Actionscript


Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">
Trackback this post | Subscribe to the comments via RSS Feed