Saturday, July 6, 2013
Animated Scrolling List
In Flex 4, the Spark has a function called . This function immediately scrolls the list to that index if it is not visible.I've added a slight modification to this to animate the scrolling over half a second to make it much smoother. The animation is done using an instance on the list's data group, and setting the property to verticalScrollPosition.Here it is in action, as usual right click to view source:For simplicity I am only scrolling the vertical scrollbar. If you are using a horizontal or tiled list, you'll want to animate the horizontal scrollbar too. In the tile case, you could use a instance to animate both the horizontal and vertical scrollbars. - Full Post
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment