You know when you right-click on a scene and a bunch of options pop up? How do you disable the rewind and forward options (in-case a user accidentally presses on one of those options) because it screws my whole Flash game up.
Asked
Active
Viewed 183 times
0
-
1Possible duplicate of [remove the right click menu in flash 9](http://stackoverflow.com/questions/377033/remove-the-right-click-menu-in-flash-9) – Vesper Jun 28 '16 at 09:52
1 Answers
1
You can disable most of the context menu with
stage.showDefaultContextMenu = false;
This will still leave the Settings and About sections though
There was a trick to completely remove the right click menu by catching up right click events on the stage, no idea if it still works with the current flash player versions:
stage.addEventListener(MouseEvent.RIGHT_CLICK, doNothing);
private function doNothing(e:MouseEvent):void
{
//do nothing...
}

Philarmon
- 1,796
- 1
- 10
- 14
-
-
I wonder if adding `e.preventDefault()` should be used in `doNothing()` because otherwise it does nothing also to prevent showing the menu. – Vesper Jul 06 '16 at 06:22