是否有可能赶上右击闪存(AS3)里面?
Is it possible to catch a right-click inside of flash (AS3)?
没有JQuery的/ JavaScript的。
No JQuery/JavaScript.
我需要暂停游戏时,右键单击被抓住了,所以我没有那么多要禁用上下文菜单,我只是想告诉大家,单击右键发生。是否有一个事件监听器,我可以添加?任何其他的想法?
I need to pause gameplay when a right-click is caught, so I don't so much want to disable the context-menu as I do just want to tell that a right-click has happened. Is there an EventListener I can add? Any other ideas?
更新: 我需要的事件被触发,因为他们实际上是右击,不只是后上下文菜单中消失。
UPDATE: I need the event to be triggered as they are actually right clicking, not just after the context-menu has disappeared.
推荐答案有只有两种方式来捕获右击事件:
There are only two ways to capture a right click event:
有关网页浏览器应用程序:使用JavaScript 。您可以在Flash直接做到这一点,因为你无法禁用上下文菜单。
For a web browser application: Use JavaScript. You can't do it directly in Flash, because you can't disable the context menu.
对于桌面应用程序:部署为AIR应用程序。 AIR具有 RIGHT_CLICK的MouseEvent 建
For a desktop application: Deploy as an AIR application. AIR has a RIGHT_CLICK MouseEvent built in.
有没有第三步。 :(
P.S:也就是说,如果 menuSelect 真的不适合你的工作 - 文件说,这是触发的在的菜单中打开
P.S: That is, if menuSelect really doesn't work for you - the documentation says it is triggered before the menu is opened.
更多推荐
赶上右击AS3
发布评论