Wednesday, October 17, 2007

Set the verticalScrollPosition

Sometimes we want to set the scrollerbar position by actionscript, that can be easily achieved by:
verticalScrollPosition = maxVerticalScrollPosition;
however, this won't work right after we added some childs to a container.
The flash player need to refresh the changes in order to calculate the right position.

To move to the right position, you may try this:
validateNow();
verticalScrollPosition = maxVerticalScrollPosition;

No comments: