Disable right click in flash with AS or from browser

旧街凉风 提交于 2020-01-07 04:20:29

问题


My question is simple. I want to disable mouse right click on my FLASH GAMES website, so that players cannot leave my website when right clicking a game and clicking on "ABOUT FLASH PLAYER". My games are developed using AS3 and FLEX/FLASH .

I am interested in any kind of solutions, so that every player that plays my games cannot right click the game and see the "ABOUT FLASH PLAYER" or at least to prevent him leaving the website when clicking "ABOUT FLASH PLAYER".

I tried to disable rightclick from JS but most likely the code wasnt good.

Any help ?

Regards


回答1:


If you're using Flash Player 11 try

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

More details in this tutorial.



来源:https://stackoverflow.com/questions/13786419/disable-right-click-in-flash-with-as-or-from-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!