How to enable context menu for flash?

When compiling for flash, right click menu is disabled for some reason.

Attempts to override the default menu doesn’t help it appear either:

import flash.ui.ContextMenu;
var menu:ContextMenu = new ContextMenu();
contextMenu = menu; //or Lib.current.contextMenu = menu;

What to do?

Which version of Flash Player are you running?

Perhaps it is because Lime has a right-click event listener, I think this may disable the context menu. Hmm :confused:

compiling for flash 11.2

I just resolved this in Lime, by default, Lime will not listen to right-click events on Flash when using OpenFL: https://github.com/openfl/lime/commit/4c8122b00206c3045657ca59430b7dddc6de0ceb

This patch will go out in the next release. By not listening for right-click events, Flash will continue to display the standard context menu

Thank you!

Will I have to change something in the configuration file?

Nope, it should be disabled by default (allowing the context menu). I added a define in case someone uses OpenFL, but still wants Lime style right click events. This is probably unlikely