Flex 彻底屏蔽右键 (转载)

it2024-11-08  11

仅支持 Flash 11.3 或更高版本

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="init()" >

      

       <mx:Script>

              <![CDATA[

                     // 要点: -locale en_US -swf-version=15

                     private function init():void{

                            this.addEventListener(MouseEvent.CONTEXT_MENU, this.handler_mouseEvent);

                     }

                     private function handler_mouseEvent(_arg1:MouseEvent):void{

                     }

                    

                     function hideMenu() {

                            stage.showDefaultContextMenu = false;

                     }

                    

              ]]>

       </mx:Script>

       <mx:Button x="112" y="236" label="Hide Menu" click="hideMenu()"/>

      

</mx:Application>

转载自:http://www.beansoft.biz/?p=2975

转载于:https://www.cnblogs.com/wuhenke/archive/2012/11/24/2786126.html

相关资源:asp.net知识库
最新回复(0)