一、目的:
1、flash中很多不想出現右鍵,觸摸屏的時候可以設置控制面板的筆觸
2、下面是代碼
stage.addEventListener(MouseEvent.RIGHT_CLICK,function(e:MouseEvent):void{});
//測試:屏蔽右鍵菜單=================
////方法1:失敗
//Stage.showMenu=false;
//static stage.showMenu=false;
////方法2:失敗
//fscommand("showmenu",false)
//fscommand("showmenu","false")
////方法3:失敗
//var my_cm:ContextMenu = new ContextMenu();
//my_cm.hideBuiltInItems();
//my_cm.builtInItems.print = true;
////方法4:失敗
//var my_cm:ContextMenu = new ContextMenu();
//my_cm.builtInItems.print = false;
//my_cm.builtInItems.quality=false;
//my_cm.builtInItems.zoom=false;
////my_cm.builtInItems.forward_back=false;
//this.menu = my_cm;
////方法5:失敗
// var right = new Object();
// right.onMouseMove = function()
// {
// Stage.scaleMode = "noScale";
// }
// Mouse.addListener(right);
////方法6:失敗
//stage.addEventListener(Event.ADDED_TO_STAGE,init);
//function init(e:Event):void
//{
// //就是這句話
// //stage.addEventListener(MouseEvent.RIGHT_CLICK,function(e:MouseEvent):void{});
// stage.addEventListener(MouseEvent.RIGHT_CLICK,RIGHT_CLICK);
//}
//
//function RIGHT_CLICK(e:Event):void
//{
// trace("右鍵點擊了");
//}
//方法7:失敗
//stage.showDefaultContextMenu =false;
//方法8:成功
stage.addEventListener(MouseEvent.RIGHT_CLICK,function(e:MouseEvent):void{});
//=============================