Actionscript 3、flexSDK、在 Flash 阶段时阻止鼠标滚轮滚动
我搜索了很多,但我找不到这个“错误”的解决方案,因为它在这里被称为: http://fcontheweb.com/articles/scrollwheel/
请点击第一次闪烁,然后使用鼠标滚轮,然后单击第二个闪光灯并再次使用鼠标滚轮。现在你完全明白我所说的“bug”是什么意思了。
问题是,我相信这个错误可以在没有外部接口的情况下得到解决。这个聊天是用 AS 3 进行的: http://www.kongregate.com/games/UnknownGuardian/game-开发室-gdr 打开“codebox”,按住 ENTER 键生成一百行左右,然后测试鼠标滚轮。
它不使用任何外部接口技术(很明显,因为它是 Kongregate,并且由作者确认),只是 mx.component.textArea 本身很好地实现了滚动。
我无法使用 Even.preventDefault 或 stopPropagation 来实现这一点。有什么想法吗?
E:谢谢你,divillysausages!这个问题仍然没有在 1% 中得到解答 - textArea 组件的解决方法是什么?
I searched for this a lot, but I couldn't find a solution for this 'bug' as it's called here:
http://fcontheweb.com/articles/scrollwheel/
Please, click on first flash, and use mouse wheel, then click on second flash and use mouse wheel again. Now You know perfectly what 'bug' I mean.
The thing is, I believe this bug can be solved WITHOUT externalinterface. This chat is made with AS 3:
http://www.kongregate.com/games/UnknownGuardian/game-development-room-gdr
Open 'codebox', hold ENTER to make a hundred of lines or so, and then test your mouse wheel.
It doesn't use any externalinterface technique (both obviously as it's Kongregate, and confirmed by author), just mx.component.textArea that itself implements the scrolling nicely.
I couldn't achieve that with even.preventDefault or stopPropagation. Any ideas?
E: Thank You, divillysausages! The question still isn't answered in 1% - what is textArea component's workaround?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里提出了两种方法: http://gamedev.rasmuswriedtlarsen.com/2010/01/18/quicktip-scrolling-only-in-swf-not-on-page/,但只有第一个适用Kongregate
显然它使用 ByteArray 和 LocalConnection 构建一个 AS2 swf,阻止大多数浏览器获取滚动事件
There's two methods proposed here: http://gamedev.rasmuswriedtlarsen.com/2010/01/18/quicktip-scrolling-only-in-swf-not-on-page/, but only the first one works on Kongregate
Apparently it uses
ByteArray
andLocalConnection
to construct an AS2 swf that stops most browsers getting the scroll event