Is it possible, using actionscript 3 to disable the right click menu?
Any help greatly appreciated!
Is it possible, using actionscript 3 to disable the right click menu?
Any help greatly appreciated!
I don't think you can do this in AS3 (Adobe probably never put support in there because it would prevent the user from accessing the security settings).
There are ways to do it through HTML, etc.
Check out http://www.actionscript.org/forums/showthread.php3?t=175669
You can use:
stage.showDefaultContextMenu = false;
to hide everything but the settings option.
You can hide everything except for the Settings item, as said by Lain.
By the way: If you need to customize it you can use the ContextMenu class from the flash.ui package. Call hideBuiltInItems on it first to hide everything except for the Settings and then assign it to the menu property of the object you want to use the menu for (or root for the entire applet).
FYI, there is a nice tutorial about it that you can find here
this code would also work
new ContextMenu();
newMenu.hideBuiltInItems();
this.menu = newMenu;
Is the better option
_level1._y = 195; var myMenu:ContextMenu = new ContextMenu(); myMenu.hideBuiltInItems(); _root.menu = myMenu;
It is a problem ,since if u disable right click in flash then u can't access security options.Therefore disable code generally does not work in flash ,there is alternate way to do this --- u can disable right click on whole page by using Javascript code
go to here all code is given right click disable code