在 IE 中使用 AS3 检测 CTRL+V

发布于 2024-07-15 23:24:07 字数 104 浏览 4 评论 0原文

我无法在 IE 中使用 AS3 检测 swf 上的键盘事件 CtrlV。 它似乎触发了默认的浏览器行为,而我无法执行任何操作...有什么解决方法吗?

I am not able to detect the keyboard event CtrlV on a swf using AS3 in IE. It seems to trigger the default browser behavior, and I'm not able to do anything... Any workaround for this?

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

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

发布评论

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

评论(2

年华零落成诗 2024-07-22 23:24:07

如果这是您遇到的浏览器行为,您可以编写一些 JavaScript 来阻止它。 还有另一篇相关的文章,关于在 JS 中捕获关键事件并将它们转发到 flash。 请参阅我的回复此处并重点关注 preventDefault () 部分。 您应该删除不需要的代码并留下类似的内容

$(document).ready(function() {
    $(document).keydown(function (event) { event.preventDefault(); });
}

当然,您必须导入 jQuery库

If it's a browser behavior you're stumbling on, you can write some JavaScript to prevent it. There's another related post, about capturing key events in JS and relaying them to flash. See my reply here and focus on the preventDefault() part. You should just take out what you don't need of the code and leave something like

$(document).ready(function() {
    $(document).keydown(function (event) { event.preventDefault(); });
}

Of course, you'll have to import the jQuery library.

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