James
James

Reputation: 1

flex4 Scrolling with mouse move

How can I scroll a group in flex4 with the movement of the mouse position?

Would like it to scroll on the mouse X position.

Thanks

Upvotes: 0

Views: 609

Answers (1)

JeffryHouser
JeffryHouser

Reputation: 39408

Use the setValue() method on the scroll bar component to automatically scroll.

You should be able to access the specific scroll bar from your sccroller:

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

Add that code in an event listener for the mouseMove event.

Upvotes: 1

Related Questions