使用额外功能处理滑动效果 (flex AIR)
我在可滚动容器中有一些文本内容,我希望用户能够滚动它,使其具有根据滑动速度移动的良好效果,并保持滚动直到用户点击它。 (与移动触摸屏的许多应用程序一样)。
我正在考虑结合事件来做到这一点。我将捕捉滑动以了解方向,将鼠标移入和移出以查看滑动的速度和长度,然后以成比例的速度和长度继续滚动,直到用户点击屏幕。
我的想法有道理吗? (我不想做这项工作并发现它真的很简单,我只是不知道如何)
提前感谢
玛丽亚
I have some text content in a scrollable container and I want the user to be able to scroll it having the nice effect of it moving according to the swipe velocity and to keep scrolling until the user taps it. (as many applications for mobile touch screens).
I am thinking to combine events to do it. I will catch the swipe to know the direction, have mouse in and out to see velocity and legth of the swipe, and then keep scrolling with a proportional velocity and length until the user taps the screen.
Does my idea makes sense? (I don´t want to do the work and find out it was really simple and I just didn{t knew how)
Thanks in advance
Maria
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
滚动条将为您实现此目的:
单击屏幕并沿方向拖动。点击可停止移动或等待移动结束。
A scroller will achieve this for you:
Click the screen and drag in the direction. Tap to stop the movement or wait till it ends.