通过 Javascript 捕获右键单击,无需 wmode

发布于 2024-07-22 04:16:24 字数 591 浏览 2 评论 0 原文

当使用英语以外的任何其他语言时,Flash 播放器在 Firefox/Chrome 中使用 wmode="window" 以外的任何内容时都会出现错误。 此错误已报告但尚未修复

http://bugs.adobe.com/jira/browse/FP-501

可以在此处更好地看到该问题 -

http://www.5etdemi .com/blog/archives/2005/06/firefox-wmodetransparent-is-completely-screwy-and-breaks-textfields/

现在我的问题 - 我正在尝试使用 Uza 的右键单击解决方案( http: //www.uza.lt/blog/2007/08/solved-right-click-in-as3 )在我的应用程序中,但我遇到了 wmode 的问题。 事件捕获似乎不适用于 wmode="window",我也需要多种语言才能在我的应用程序上工作。

有没有人已经确定的解决方案? 或者有什么方法可以在不设置wmode的情况下捕获右键。

任何帮助将不胜感激。 谢谢!!

Flash player has a bug in using anything other than wmode="window" in Firefox/Chrome when using any other language than English. This bug is reported and not fixed yet

http://bugs.adobe.com/jira/browse/FP-501

The issue can be seen better here -

http://www.5etdemi.com/blog/archives/2005/06/firefox-wmodetransparent-is-completely-screwy-and-breaks-textfields/

Now to my problem - im trying to use Uza's right click solution ( http://www.uza.lt/blog/2007/08/solved-right-click-in-as3 ) in my application, but am stuck with problem of wmode. The event capturing doesnt seem to work with wmode="window" and i need multiple languages to work on my app as well.

Is there any solution to this that anyone has identified? Or is there any way that the right click can be captured without setting wmode.

Any help will be greatly appreciated. Thanks!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

起风了 2024-07-29 04:16:25

幸运的是,您通常想知道是否单击了正确的按钮。 由于 W3C 和 Microsoft 碰巧在这一点上达成了一致,并将按钮的值指定为 2,因此您仍然可以检测到右键单击。

function doSomething(e) {
    var rightclick;
    if (!e) var e = window.event;
    if (e.which) rightclick = (e.which == 3);
    else if (e.button) rightclick = (e.button == 2);
    alert('Rightclick: ' + rightclick); // true or false
}

http://www.rgagnon.com/jsdetails/js-0061.html

http://www.quirksmode.org/js/events_properties.html

http://unixpapa.com/js/mouse.html
http://www.javascripter.net/faq/leftvsri.htm

Fortunately you most often want to know if the right button has been clicked. Since W3C and Microsoft happen to agree on this one and give button a value of 2, you can still detect a right click.

function doSomething(e) {
    var rightclick;
    if (!e) var e = window.event;
    if (e.which) rightclick = (e.which == 3);
    else if (e.button) rightclick = (e.button == 2);
    alert('Rightclick: ' + rightclick); // true or false
}

http://www.rgagnon.com/jsdetails/js-0061.html

http://www.quirksmode.org/js/events_properties.html

http://unixpapa.com/js/mouse.html
http://www.javascripter.net/faq/leftvsri.htm

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文