Archive for January, 2010

Jan 14 2010

Auto Scrolling in Flex 4

Published by under Flex


In Flex 4 they have changed the scrollbar, it doesn’t have the scrollPosition property which can be used to set its position.

We have to access the verticalScrollposition through the viewport property of the scrollbar. Since this interface IViewport is implemented by groupbase, we can use any group to scroll which is pretty neat.

Here is the example and the code can be accessed by the viewsource url. Clicking on the start button will set the scroll in action.



I have used the scroller component but the same code will work with the VScrollbar, you just have to set the VGroup as its viewport and specify the dimensions of the viewport. I will post the code in a new blog post.


3 responses so far