Flex 4 ~ set s:Scroller to top

MXML
-----------------------------------------------------------------------------------------------------
<s:Scroller x="325" y="150" id="ContentScrollWrapper" width="640" height="440" horizontalScrollPolicy="off" >
<s:Group id="ContentWrapper" >
</s:Group>
</s:Scroller>



Action Script
-----------------------------------------------------------------------------------------------------
ContentScrollWrapper.viewport.verticalScrollPosition = 0;



reference
http://stackoverflow.com/questions/1346993/flex-4-sscroller-how-to-bring-contained-component-into-view

1 則留言: