ActionScript 3.0 Language and Components Reference [openASDocs]

Scroller

Properties | Methods
Scroller by Leandro Silva | Grafluxe

Package com.grafluxe
Class public class Scroller
Inheritance Scroller Sprite
Language Version: ActionScript 3.0

The GrafluxeScroller class creates a customizable full screen (liquid) scrollbar that can scroll any target.

To use this class, download the package above. Unzip, then open and install the component file using Adobe's Extension Manager.Once installed, simply go to Flash, open your components panel and drag the component to your library (no need to have it on your stage).Then import the appropriate class, assign your variable and start customizing.

Basic setup

//After adding the component to your library, add the following code block to your actions layer

import com.grafluxe.GrafluxeScroller;

var gs:GrafluxeScroller = new GrafluxeScroller();
gs.targetToScroll = myMC;
addChild(gs);

Thanks
Lee Brimelow (gotoAndLearn.com)

See also

com.grafluxe.evts.ScrollerEvent



Public Properties


Property
Defined By
alwaysShow : Boolean = false
Gets or sets a value to indicate whether to force scroll track to show even if not needed.
Scroller
bottomOffset : Number = 0
Gets or sets the additional distance you want scrolled from the bottom of the target.
Scroller
disableMouseWheel : Boolean
Enables/disables scrolling with the mouse wheel.
Scroller
masker : DisplayObject = null
Gets or sets a mask movieclip (use if your targetToScroll is masked).
Checks whether to scroll the target based on the masker height rather than stage height.
Scroller
showArrows : Boolean = true
Gets or sets a value to indicate whether to show/hide the arrow buttons.
Scroller
targetToScroll : DisplayObject = null
Gets or sets the target you want to scroll.
Scroller
thumbClickAlpha : Number = 0.85
Gets or sets the alpha of the scroll thumb once clicked.
Scroller
thumbColor : uint = 0x858585
Sets the color of the scroll thumb.
Scroller
thumbGrip : Boolean = false
Gets or sets a value to indicate whether to add the grip graphic to the scroll thumb.
Scroller
thumbRounded : Boolean = false
Gets or sets a value to indicate whether to add rounded corners to the scroll thumb.
Scroller
thumbWidth : Number = 0
Gets or sets the width of the scroll thumb.
Scroller
trackColor : uint = 0xD1D1D1
Sets the color of the scroll track.
Scroller
trackWidth : Number = 15.0123
Gets or sets the width of the scroll track.
Scroller

Public Methods


Method
Defined By
Scroller():void
Creates a new Scroller instance.
Scroller
scrollTo(yLoc:Number, speed:Number = 1):void
Scrolls target to specific position. Speed in milliseconds. Works like HTML Anchors.
Scroller
stopScrollTo():void
Stops scrollTo method.
Scroller
updateIt():void
Allows you to update properties in a live environment. See sample.
Scroller

Created Mar 12 2015