AxisScroller
Usage
public function AxisScroller($stage:Stage, $holder:MovieClip,
$scroller:MovieClip, $toBeScrolled:MovieClip, $track:MovieClip,
$mask:MovieClip, $axis:String, $optionalParams:Object):void
Description
Creates a new instance of the AxisScroller class.
The $optionalParams parameter takes in a couple of values.
- scrollType: A string representing the scroll type, "instant" or "easing" (default: "easing")
- isTrackClickable: A boolean value that makes the track clickable so
that you can scroll directly to a certain spot (default: true)
- useArrows: A boolean value that allows the use of arrow buttons (default: false)
- upArrow: If useArrows, a movie clip that represents the up arrow button (default: null)
- downArrow: If useArrows, a movie clip that represents the down arrow button (default: null)
- continuousScroll: If useArrows, a boolean that specifies if when
pressing the arrows the scrolling should happen continuously or not
(default: false)
- easeFunc: A function representing the ease type you'd like to use,
as per the Tween class easing functions (default: Regular.easeOut)
- duration: An integer (in seconds) representing the time that the
scrollable content will take to move when easing is used (default: .25)
- arrowMove: An integer (in pixels) that the scrollable content will move onMouseWheel/Key/Arrow movement (default: 100)
- autoHideControls: A boolean value that hides the
scroller/track/arrows (if applicable) if the scroll content is too
small to scroll (default: false)
- scaleScroller *: A boolean value that allows automatic scaling of the scroll bar (default: false)
If you use the scaleScroller optional parameter, please make the size
of the scroll bar the same size as the track and this will take care of
scaling it automatically for you. If you AREN'T using this parameter,
please size your scroll bar accordingly manually.
Parameters
- $stage
- The stage object to use for keyboard input
- $holder
- The movie clip (or timeline) that holds all of the other clips corresponding to the scroller
- $scroller
- The movie clip to be used as the scroller
- $toBeScrolled
- The movie clip where the scrollable content resides
- $track
- The movie clip that is used as the track (measures extremes)
- $mask
- The movie clip that is used as the mask for the scrollable content area
- $axis
- A string value of either "x" or "y" that determines what axis the content is scrolled along
- $optionalParams
- Optional parameters to further control the scroller