remove the right click menu in flash 9

2019-02-21 16:06发布

Is it possible, using actionscript 3 to disable the right click menu?

Any help greatly appreciated!

8条回答
对你真心纯属浪费
2楼-- · 2019-02-21 16:46

You can use:

stage.showDefaultContextMenu = false;

to hide everything but the settings option.

查看更多
贼婆χ
3楼-- · 2019-02-21 16:46

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

查看更多
三岁会撩人
4楼-- · 2019-02-21 16:54

Hello a couple of years later. I had the same problem but while using a touch-screen. If you keep the pointing device (my finger) touching the screen for more than a second the "right-click menu" will show up. I soved it going to the control panel under Windows7, "Pencil and input devices", Touch Tab, Actions, Turn off actions for "Keep pressed".

My windows is in spanish and the names are problably a bit different but I'm sure you'll know which button is which.

查看更多
一夜七次
5楼-- · 2019-02-21 16:58

this code would also work

var newMenu=new ContextMenu();
newMenu.hideBuiltInItems();
this.menu = newMenu;
查看更多
成全新的幸福
6楼-- · 2019-02-21 16:59

This is a better option

_level1._y = 195;
var myMenu:ContextMenu = new ContextMenu();
myMenu.hideBuiltInItems();
_root.menu = myMenu;
查看更多
Explosion°爆炸
7楼-- · 2019-02-21 17:00

Starting with Flash Player 11.2, it's possible now to override the behavior for the right button click on the mouse, e.g.

stage.addEventListener(MouseEvent.RIGHT_CLICK, function(e:Event){});

Here is the corresponding entry in the ActionScript 3 reference.

查看更多
登录 后发表回答