简体   繁体   English

flex4用鼠标移动滚动

[英]flex4 Scrolling with mouse move

How can I scroll a group in flex4 with the movement of the mouse position? 如何通过鼠标位置的移动在flex4中滚动组?

Would like it to scroll on the mouse X position. 希望它在鼠标X位置上滚动。

Thanks 谢谢

Use the setValue() method on the scroll bar component to automatically scroll. 使用滚动条组件上的setValue()方法自动滚动。

You should be able to access the specific scroll bar from your sccroller: 您应该能够从sccroller访问特定的滚动条:

scroller.horizontalScrollBar.setValue(mouseXPosition);
scroller.verticalScrollBar.setValue(mouseYPosition);

Add that code in an event listener for the mouseMove event. 将该代码添加到mouseMove事件的事件侦听器中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM