With the release of flex 4.6 , it appears the mobile version of the scroller has been optimised. Now the scroller defers creation of the scroll bar until the user interacts with the scroller.... Which all sounds good performance wise, faster page creation etc...
But if I want to move the scroller position before the user has interacted with the object , IE to jump to particular position before they start scrolling, I'm not sure what to do. Orginally I would have done something like...myScroller.horizontalScrollBar.value = 100 ... but of course myScroller.horizontalScrollBar is now null.
Am I missing something - is there another way.
Ok found a work around...
I extended the scroller class and added a couple of functions like...
public function scrollerCreateHScrollBar():void
if ( !this.horizontalScrollBar && this.horizontalScrollBarFactory)
this.horizontalScrollBar = HScrollBar(this.createDynamicPartInstance("horizontalScrollBarFactory"));
then called to create teh scoll bars when I want them...
See the last couple slides in this presentation: http://flexponential.com/2011/10/05/performance-tuning-mobile-flex-applications/
Basically use myScroller.viewport.verticalScrollPosition rather than myScroller.verticalScrollbar.value