Flex 和鼠标滚轮
这是我需要帮助的应用程序: http://www.nypinball.com/inventory.php
顶部的整个框是一个 Flex 应用程序。 左边列出弹球机的盒子是 VBox。 正如您所看到的,如果您尝试使用鼠标滚轮滚动,它不会响应。 关闭此功能的原因是因为我发现如果打开它,当您向上/向下滚动时,整个页面都会随之移动。 因此,如果您向下滚动四到五次,该应用程序就会消失。 去年编程时,我尝试寻找解决方案,但找不到任何答案。 有谁知道是否有办法让 Flex 抓住鼠标滚轮的焦点而不让浏览器也移动?
Here is the application I need help with: http://www.nypinball.com/inventory.php
The entire box at the top is a Flex application. The box on the left with the list of pinball machines is a VBox. As you can see, if you try to scroll with your mousewheel, it doesnt respond. The reason this is shut off is because I found that if it's turned on, when you scroll up/down, the whole page goes with it. So if you scroll down four or five times, the application goes out of sight. I tried finding a solution to this when I programmed this last year but wasnt able to find any answers. Does anyone know if there's a way to make Flex grab the focus of the mousewheel and not let the browser move as well?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
还有另一个解决方案这里
相同的解决方案,但不需要 div,它测试事件是否出现在 swf 对象上
there is another solution here
Same solution but no need of a div, it test if the event appear on a swf object
嗯...您可以完全关闭滚动...
找到原始问题的解决方案将是一个更好的解决方案。 我 100% 确信 Flash 可以对鼠标滚轮事件做出反应,而无需滚动整个页面。
Well... you could turn off scrolling altogether...
Finding a solution to your original problem would be a nicer solution. I'm 100% sure that Flash can react to mouse wheel events without scrolling the whole page.
这个项目可能会有所帮助:GAE SWF 项目
他们有一个弹性 示例 看起来滚动效果很好。 他们的示例中有一个鼠标滚轮选项卡。
This project may help: GAE SWF Project
They have a flex example that appears to scroll nicely. There is a mousewheel tab in their example.
有一个解决方案这里
它使用一个封装swf对象的div并捕获鼠标滚轮事件并停止它
我已经测试过它并且它正在工作
there is a solution here
it use a div who encapsulate the swf object and catch the mousewheel event and stop it
i've tested it and it's working