Scroll to the top… Scroll to the bottom…
Written by Venkat on January 27, 2008 – 9:26 pmI have noticed that quite a few people ask for smooth scrolling on list based components in Flex. Smooth scrolling offers a much nicer feel as opposed to snapping to a particular position in the list. The list classes in Flex do not support this as of now. So, I put together this small component which uses the Box component and provides smooth scrolling.
The disadvantage of using this component is that it does not offer all the optimizations that the list has and hence can choke if it has a large number of items in the data provider. However, it can be safely used for a small list of items, such as displaying a bunch of images etc.
This component offers vertical smooth scrolling. You can modify the code to easily make it work for horizontal scrolling.
Subscribe to my blog using RSS
April 6th, 2009 at 5:59 pm
One problem I’m having is the this component, when added to a canvas, does not resize correctly when the browser is resized. Make the browser window smaller, and the smooth scrolling component goes outside of the canvas boundries…