Package | spark.components.supportClasses |
Class | public class ScrollBarBase |
Inheritance | ScrollBarBase ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Subclasses | HScrollBar, VScrollBar |
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
This control extends the TrackBase class and is the base class for the HScrollBar and VScrollBar controls.
A scroll bar consists of a track, a variable-size scroll thumb, and two optional arrow buttons. The ScrollBarBase class uses four parameters to calculate its display state:
-
minimum
: Minimum range value. -
maximum
:Maximum range value. -
value
: Current position, which must be within the minimum and maximum range values. - Viewport size: Represents the number of items in the range that you can display at one time. The number of items must be less than or equal to the range, where the range is the set of values between the minimum range value and the maximum range value.

The <s:ScrollBarBase>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:ScrollBarBase Properties pageSize="20" snapInterval="1" viewport="null" Styles autoThumbVisibility="true" fixedThumbSize="false" repeatDelay="500" repeatInterval="35" smoothScrolling="true" symbolColor="0x000000" />
More examples
Related API Elements
spark.skins.spark.ScrollerSkin
spark.skins.spark.ScrollBarDownButtonSkin
spark.skins.spark.ScrollBarLeftButtonSkin
spark.skins.spark.ScrollBarRightButtonSkin
spark.skins.spark.ScrollBarUpButtonSkin
Property | Defined By | ||
---|---|---|---|
![]() | accessibilityImplementation : AccessibilityImplementation
The current accessibility implementation (AccessibilityImplementation)
for this InteractiveObject instance. | InteractiveObject | |
![]() | accessibilityProperties : AccessibilityProperties
The current accessibility options for this display object. | DisplayObject | |
![]() | alpha : Number
Indicates the alpha transparency value of the object specified. | DisplayObject | |
![]() | blendMode : String
A value from the BlendMode class that specifies which blend mode to use. | DisplayObject | |
![]() | blendShader : Shader [write-only]
Sets a shader that is used for blending the foreground and background. | DisplayObject | |
![]() | buttonMode : Boolean
Specifies the button mode of this sprite. | Sprite | |
![]() | cacheAsBitmap : Boolean
If set to true, Flash runtimes cache an internal bitmap representation of the
display object. | DisplayObject | |
![]() | cacheAsBitmapMatrix : Matrix
If non-null, this Matrix object defines how a display object is rendered when
cacheAsBitmap is set to true. | DisplayObject | |
![]() | constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | |
![]() | contextMenu : NativeMenu
Specifies the context menu associated with this object. | InteractiveObject | |
![]() | dropTarget : DisplayObject [read-only]
Specifies the display object over which the sprite is being dragged, or on
which the sprite was dropped. | Sprite | |
![]() | filters : Array
An indexed array that contains each filter object currently associated with the display object. | DisplayObject | |
![]() | focusRect : Object
Specifies whether this object displays a focus rectangle. | InteractiveObject | |
![]() | graphics : Graphics [read-only]
Specifies the Graphics object that belongs to this sprite where vector
drawing commands can occur. | Sprite | |
![]() | hitArea : Sprite
Designates another sprite to serve as the hit area for a sprite. | Sprite | |
![]() | loaderInfo : LoaderInfo [read-only]
Returns a LoaderInfo object containing information about loading the file
to which this display object belongs. | DisplayObject | |
![]() | mask : DisplayObject
The calling display object is masked by the specified mask object. | DisplayObject | |
![]() | metaData : Object
Obtains the meta data object of the DisplayObject instance if meta data was stored alongside the
the instance of this DisplayObject in the SWF file through a PlaceObject4 tag. | DisplayObject | |
![]() | mouseChildren : Boolean
Determines whether or not the children of the object are mouse, or user input device, enabled. | DisplayObjectContainer | |
![]() | mouseEnabled : Boolean
Specifies whether this object receives mouse, or other user input, messages. | InteractiveObject | |
![]() | mouseX : Number [read-only]
Indicates the x coordinate of the mouse or user input device position, in pixels. | DisplayObject | |
![]() | mouseY : Number [read-only]
Indicates the y coordinate of the mouse or user input device position, in pixels. | DisplayObject | |
![]() | name : String
Indicates the instance name of the DisplayObject. | DisplayObject | |
![]() | needsSoftKeyboard : Boolean
Specifies whether a virtual keyboard (an on-screen, software keyboard) should display
when this InteractiveObject instance receives focus. | InteractiveObject | |
![]() | opaqueBackground : Object
Specifies whether the display object is opaque with a certain background color. | DisplayObject | |
![]() | root : DisplayObject [read-only]
For a display object in a loaded SWF file, the root property is the
top-most display object in the portion of the display list's tree structure represented by that SWF file. | DisplayObject | |
![]() | scale9Grid : Rectangle
The current scaling grid that is in effect. | DisplayObject | |
![]() | scrollRect : Rectangle
The scroll rectangle bounds of the display object. | DisplayObject | |
![]() | softKeyboard : String
Controls the appearance of the soft keyboard. | InteractiveObject | |
![]() | softKeyboardInputAreaOfInterest : Rectangle
Defines the area that should remain on-screen when a soft keyboard is displayed (not available on iOS). | InteractiveObject | |
![]() | soundTransform : flash.media:SoundTransform
Controls sound within this sprite. | Sprite | |
![]() | stage : Stage [read-only]
The Stage of the display object. | DisplayObject | |
![]() | tabChildren : Boolean
Determines whether the children of the object are tab enabled. | DisplayObjectContainer | |
![]() | tabEnabled : Boolean
Specifies whether this object is in the tab order. | InteractiveObject | |
![]() | tabIndex : int
Specifies the tab ordering of objects in a SWF file. | InteractiveObject | |
![]() | textSnapshot : flash.text:TextSnapshot [read-only]
Returns a TextSnapshot object for this DisplayObjectContainer instance. | DisplayObjectContainer | |
![]() | useHandCursor : Boolean
A Boolean value that indicates whether the pointing hand (hand cursor) appears when the pointer rolls
over a sprite in which the buttonMode property is set to true. | Sprite |
Property | Defined By |
---|
Method | Defined By | ||
---|---|---|---|
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | EventDispatcher | |
![]() |
Indicates whether the security restrictions
would cause any display objects to be omitted from the list returned by calling
the DisplayObjectContainer.getObjectsUnderPoint() method
with the specified point point. | DisplayObjectContainer | |
![]() |
Determines whether the specified display object is a child of the DisplayObjectContainer instance or
the instance itself. | DisplayObjectContainer | |
![]() |
Returns a rectangle that defines the area of the display object relative to the coordinate system
of the targetCoordinateSpace object. | DisplayObject | |
![]() |
Returns the child display object that exists with the specified name. | DisplayObjectContainer | |
![]() |
Returns an array of objects that lie under the specified point and are children
(or grandchildren, and so on) of this DisplayObjectContainer instance. | DisplayObjectContainer | |
![]() |
Returns a rectangle that defines the boundary of the display object,
based on the coordinate system defined by the targetCoordinateSpace
parameter, excluding any strokes on shapes. | DisplayObject | |
![]() |
Converts the point object from the Stage (global) coordinates
to the display object's (local) coordinates. | DisplayObject | |
![]() |
Converts a two-dimensional point from the Stage (global) coordinates to a
three-dimensional display object's (local) coordinates. | DisplayObject | |
![]() |
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | |
![]() |
Indicates whether an object has a specified property defined. | Object | |
![]() |
Evaluates the bounding box of the display object to see if it overlaps or intersects with the
bounding box of the obj display object. | DisplayObject | |
![]() |
Evaluates the display object to see if it overlaps or intersects with the
point specified by the x and y parameters. | DisplayObject | |
![]() |
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | |
![]() |
Converts a three-dimensional point of the three-dimensional display
object's (local) coordinates to a two-dimensional point in the Stage (global) coordinates. | DisplayObject | |
![]() |
Converts the point object from the display object's (local) coordinates to the
Stage (global) coordinates. | DisplayObject | |
![]() |
Indicates whether the specified property exists and is enumerable. | Object | |
![]() |
Removes all child DisplayObject instances from the child list of the DisplayObjectContainer instance. | DisplayObjectContainer | |
![]() |
Removes a listener from the EventDispatcher object. | EventDispatcher | |
![]() |
Raises a virtual keyboard. | InteractiveObject | |
![]() |
Sets the availability of a dynamic property for loop operations. | Object | |
![]() |
Lets the user drag the specified sprite. | Sprite | |
![]() |
Lets the user drag the specified sprite on a touch-enabled device. | Sprite | |
![]() |
Recursively stops the timeline execution of all MovieClips rooted at this object. | DisplayObjectContainer | |
![]() |
Ends the startDrag() method. | Sprite | |
![]() |
Ends the startTouchDrag() method, for use with touch-enabled devices. | Sprite | |
![]() |
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | |
![]() |
Returns the primitive value of the specified object. | Object | |
![]() |
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
Method | Defined By |
---|
Styles are either common or associated with a specific theme. If the style is common, it can be used with any theme. If a style is associated with a specific theme, it can only be used if your application uses that theme.
Style | Description | Defined By | ||
---|---|---|---|---|
autoThumbVisibility | Type: Boolean CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 If true (the default), the thumb's visibility will be reset whenever its size is updated. Overrides of updateSkinDisplayList() in
HScrollBar and VScrollBar
make the thumb visible if it's smaller than the track,
unless this style is false.
Set this style to false to control thumb visibility directly.
The default value is true . | ScrollBarBase | ||
![]() | Type: String CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 The vertical distance in pixels from the top edge of the content area to the control's baseline position. | UIComponent | ||
![]() | Type: String CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 The vertical distance, in pixels, from the bottom edge of the component to the bottom edge of its parent container's content area. | UIComponent | ||
![]() | Type: uint Format: Color CSS Inheritance: Yes Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 Color of the component highlight when validation fails. | UIComponent | ||
![]() | Type: Class Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 Name of the skin class to use for this component when a validation error occurs. | SkinnableComponent | ||
fixedThumbSize | Type: Boolean CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 If true, the thumb's size along the scrollbar's axis will be its preferred size. The default value is false . | ScrollBarBase | ||
![]() | Type: Class CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 Skin used to draw the focus rectangle. | UIComponent | ||
![]() | Type: String CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 The horizontal distance in pixels from the center of the component's content area to the center of the component. | UIComponent | ||
![]() | Type: String CSS Inheritance: Yes Language Version: ActionScript 3.0 Product Version: Flex 4.5 Runtime Versions: Flash10, AIR 2.5 The primary interaction mode for this component. | UIComponent | ||
![]() | Type: String CSS Inheritance: Yes Language Version: ActionScript 3.0 Product Version: Flex 4.1 Runtime Versions: Flash10, AIR 1.5 Specifies the desired layout direction of a component. | UIComponent | ||
![]() | Type: String CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 The horizontal distance, in pixels, from the left edge of the component to the left edge of its parent container's content area. | UIComponent | ||
liveDragging | Type: Boolean CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 If true (the default) then dragging the scrollbar's thumb with the mouse immediately updates the scrollbar's value. If false, the scrollbar's value is only updated when the mouse button is released. The default value is true . | ScrollBarBase | ||
repeatDelay | Type: Number Format: Time CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 Number of milliseconds after the first page event until subsequent page events occur. The default value is 500 . | ScrollBarBase | ||
repeatInterval | Type: Number Format: Time CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 Number of milliseconds between page events if the user presses and holds the mouse on the track. The default value is 35 . | ScrollBarBase | ||
![]() | Type: String CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 The horizontal distance, in pixels, from the right edge of the component to the right edge of its parent container's content area. | UIComponent | ||
![]() | Type: Boolean CSS Inheritance: Yes Language Version: ActionScript 3.0 Product Version: Flex 4.5 Runtime Versions: Flash10, AIR 1.5 Show the error border or skin when this component is invalid | UIComponent | ||
![]() | Type: Boolean CSS Inheritance: Yes Language Version: ActionScript 3.0 Product Version: Flex 4.5 Runtime Versions: Flash10, AIR 1.5 Show the error tip when this component is invalid and the user rolls over it | UIComponent | ||
![]() | Type: Class Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 Name of the skin class to use for this component. | SkinnableComponent | ||
![]() | Type: Number Format: Time CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 Duration in milliseconds for a sliding animation when you click on the track to move a thumb. | TrackBase | ||
smoothScrolling | Type: Boolean CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 This style determines whether the scrollbar will animate smoothly when paging and stepping. When false, page and step operations will jump directly to the paged/stepped locations. When true, the scrollbar, and any content it is scrolling, will animate to that location. The default value is true . | ScrollBarBase | ||
![]() | Type: String CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 The vertical distance, in pixels, from the top edge of the component to the top edge of its parent container's content area. | UIComponent | ||
![]() | Type: String CSS Inheritance: No Language Version: ActionScript 3.0 Product Version: Flex 3 Runtime Versions: Flash9, AIR 1.1 The vertical distance in pixels from the center of the component's content area to the center of the component. | UIComponent |
Style | Description | Defined By | ||
---|---|---|---|---|
![]() | Type: uint Format: Color CSS Inheritance: Yes Theme: spark, mobile Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 The main color for a component. | SkinnableComponent | ||
symbolColor | Type: uint Format: Color CSS Inheritance: Yes Theme: spark Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 Color of any symbol of a component. Examples include the check mark of a CheckBox or the arrow of a scroll button. The default value is 0x000000 . | ScrollBarBase |
This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.
Skin Part | Description | Defined By | ||
---|---|---|---|---|
decrementButton:Button | Required: false Part Type: Static Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 An optional skin part that defines a button that, when pressed, steps the scrollbar up. This is equivalent to a decreasing step to the value property. | ScrollBarBase | ||
incrementButton:Button | Required: false Part Type: Static Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 An optional skin part that defines a button that, when pressed, steps the scrollbar down. This is equivalent to an increasing step to the value property. | ScrollBarBase | ||
![]() | Required: false Part Type: Static Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 A skin part that defines a button that can be dragged along the track to increase or decrease the value property. Updates to the value property automatically update the position of the thumb button with respect to the track. | TrackBase | ||
![]() | Required: false Part Type: Static Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 A skin part that defines a button that, when pressed, sets the value property to the value corresponding with the current button position on the track. | TrackBase |
To skin the component, implement a skin that defines the following states. Although you must implement all skin states, a skin state can be empty. An empty skin state specifies no changes to the default skin state.
Skin State | Description | Defined By | ||
---|---|---|---|---|
![]() |
Disabled State
Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 | TrackBase | ||
inactive |
The inactive state.
This is the state when there is no content to scroll,
which means maximum <= minimum.
Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 | ScrollBarBase | ||
![]() |
Normal State
Language Version: ActionScript 3.0 Product Version: Flex 4 Runtime Versions: Flash10, AIR 1.5 | TrackBase |
Wed Nov 21 2018, 06:34 AM -08:00