鼠标滚轮在滚动条上运行
如果 SWF 文件甚至其中的组件有滚动条,那么如果用户将鼠标悬停在该区域(焦点对准)上并使用鼠标滚轮,则此移动会自动转换为滚动条移动,这难道不是有意义的吗?
有什么想法是如何完成的,用于此目的的事件或类吗?我也对外部组件或类开放。我还没有开始,但我会做一个项目渲染器,因为很容易给它滚动条。
If a SWF file or even a component within it has scrollbars, wouldn't it make sense that if the user is hovered over that area (it's in focus) and uses the mouse wheel, that this movement would automatically translate to the scrollbar moving.
Any ideas how this is done, the events or classes used for this? I'm open to outside components or classes too. I haven't started yet, but I'll do an item renderer because it's easy to give it scrollbar.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
下面是一些可以让您处理鼠标滚轮滚动的代码,处理起来非常容易:
event.delta
部分将是一个正数或负数,具体取决于您滚动滚轮的方式。您可以使用它来上下移动对象。希望这有帮助。德布
Here's some code which will let you deal with mouse wheel scrolling, it's pretty easy to deal with:
The
event.delta
part will be a number that's either positive or negative, depending on which way you scrolled the wheel. You can use this to move your object up and down. Hope this helps.debu