Skip to content

Instantly share code, notes, and snippets.

@s9tpepper
Created October 1, 2010 18:54
Show Gist options
  • Save s9tpepper/606663 to your computer and use it in GitHub Desktop.
Save s9tpepper/606663 to your computer and use it in GitHub Desktop.
This example shows how you would set the scroll position of a scrollable
component to the max scroll position in Flex 3 and how it is handled in Flex 4.
// Flex 4
// myView = Some view class.
// myScroller = s:Scroller
// myContentContainer = s:Group
var maxScrollPosition:Number = myView.myContentContainer.height - myView.myScroller.viewport.height;
myView.myScroller.viewport.verticalScrollPosition = maxScrollPosition;
// Flex 3
// myView = Some view class.
// myContentContainer = mx:Canvas
myView.myContentContainer.verticalScrollPosition = myView.myContentContainer.maxVerticalScrollPosition;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment