赶上右击AS3

编程入门 行业动态 更新时间:2024-10-18 19:27:36
本文介绍了赶上右击AS3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是否有可能赶上右击闪存(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

    本文发布于:2023-11-23 16:03:59,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1622064.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:右击

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!