You can set the HorizontalScrollbar on , on your application tag?
Lets say you have:
hbox is the container which contains the 2 sections in ur swf. Now if you set the horizontalScrollPosition of "hbox" to the x-coordinate of the 3rd section, I think it shud work.
hbox.horizontalScrollPosition = x
Hope that helps.
Okay,that is if I use a HBox.
But I am not. Basically I want to scroll till a particular component is in view.
The component may or may not be in another container.
do what anton says - set verticalScrollPolicy="on" in application tag
oops! ignore my reply - i wasnt reading properly. instead do this:
Application.application.horizontalScrollPosition = Application.application.maxHorizontalScrollPosition;
(if using Flex 4, change Application.application to FlexGlobals.topLevelApplication)
Thanks for the reply.
One more thing. How do I know whether a component is visible or not?
If the main SWF has already scrolled to the component, then I need not scroll.
However, if the component is not visible, then I do need to scroll.
Basically, I want to take a snapshot of the components ... thats why I need to scroll.
you could still set the scroll pos to the max position - if it's already there, it wont matter
but if you just want to take a snapshot of a component, it doesnt have to be in view to do so