Flash wmode 设置为不透明时的 IE 滚动问题

发布于 2024-10-20 02:49:16 字数 603 浏览 1 评论 0原文

这适用于 Facebook 内的 Flash 游戏。如果 IE 中有 Flash 对象,当您使用向上和向下箭头键时,它会导致整个浏览器滚动。如果您的游戏需要向上和向下箭头,那么玩起来会非常令人沮丧并且无法接受。

wmode 设置为不透明并且需要这样。我知道将其保留为默认值可以“解决”此问题,但随后游戏将无法运行。有人说“不要使用IE”。那就太好了,但这也不是一个选择。

真正让我困惑的部分是它几天前才起作用。第一次有效的解决方案是将 Flash 对象嵌入的容器设置为自动溢出。但蜜月只持续了这么久。我不确定 Facebook 是否对 API 进行了更改,可能会破坏这一点。我恢复了可能使溢出技巧不起作用的代码。运气不好,没成功。

我们还尝试在 AS3 中放置一个文本字段来抓住 Flash 游戏的焦点,但这个技巧也不起作用。

我们尝试过以不止一种方式使用 JS,但这些都是死胡同。

我目前没有可以展示的示例页面,因为该游戏尚未向公众发布。

我完全陷入了这一点,还没有在任何地方找到解决方案。其他人也遇到过这个问题,但似乎没有人有答案……如果有的话。当您按下箭头键时,Flash 对象就会失去焦点,无论我做什么,我似乎都无法让它获得焦点。

想法、想法、修复?任何意见将不胜感激。

This would be for a Flash game within Facebook. If you have a Flash object in IE, when you use the up and down arrow keys it causes the entire browser to scroll. IF you have a game that requires the up and down arrows, this makes it very frustrating to play and just not acceptable.

The wmode is set to opaque and needs to be that way. I understand keeping it at the default would 'fix' this problem, but then the game wouldn't work. Some people say "don't use IE". That would be nice, but that also is not an option.

The part that really stumps me, is that it was working just a few days ago. The solution that worked the first time was to set the container that the Flash object was embedded in with overflow set to auto. But the honeymoon only lasted so long. I'm not sure if Facebook made an API change that might break this. I reverted code that could have possibly the overflow trick not work. No luck, didn't work.

We have also tried to put a text field to grab the focus of the Flash game in AS3, but that trick did not work either.

We have tried to use JS in more than one way, but those were dead ends.

I don't have an example page I can show at this point as the game has yet to be released to the general public.

I'm absolutely stuck at this point and haven't found a solution anywhere. Other people have had this problem but nobody seems to have an answer... if there even is one. The Flash object is losing focus as soon as you push the arrow keys, and no matter what I do I just can't seem to get it to grab focus.

Ideas, thoughts, fixes? Any input would be appreciated.

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

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

发布评论

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

评论(2

苦笑流年记忆 2024-10-27 02:49:16

我意识到这个问题现在已经很老了,但我也通过插入scrollPane并将alpha设置为零找到了一个可能的解决方案。我的解决方案可以在 此处找到
谢谢

I realise this question is quite old now, but I have also found a possible solution by inserting a scrollPane and setting the alpha to zero. My solution can be found here.
Thanks

握住我的手 2024-10-27 02:49:16

嘿我也有这个问题。如果将文本字段与侦听器结合使用,则文本字段技巧会起作用。我已经把答案在这里。

hey i had this problem too. the text field trick works if you combine it with a listener. i've put the answer here.

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