F > FScrollBar (component) |
![]() ![]() ![]() |
FScrollBar (component)
The ScrollBar component in the Flash authoring environment provides drag-and-drop functionality for adding scroll bars to dynamic and input text fields in Flash documents; it also provides a user interface for setting basic parameters. The methods of the FScrollBar component allow you to control scroll bars at runtime: you can create scroll bars, control scroll bars created in authoring, set or override basic parameters, and set additional runtime options. You do not need to use a constructor to access the methods of components. Some of the methods of the FScrollBar component are not recommended for use with scroll bars attached to text fields. See individual method entries for details.
Advanced users and programmers can use the ScrollBar component with other Flash elements to create custom user interfaces.
Component methods do not perform error checking for type, as do other native ActionScript objects and actions; therefore, it is recommended that you validate parameters before passing them to methods.
The ScrollBar component is supported by Flash Player 6 and later versions of the Flash Player.
For information on using the ScrollBar component, setting parameters during authoring, and changing the color and appearance of components, see Customizing component colors and textand Customizing component skins in the Using Components chapter in Using Flash.
Method Description Returns Returns an integer representing the current position of the scroll box (thumb). Registers a skin element to a property defined for a skin in the Read Me layer located on Frame 1 of a skin movie clip in the library. Specifies a function to call every time the scroll position changes. (You cannot use this method with text fields.) Specifies whether the scroll bar is enabled ( Specifies whether the scroll bar is horizontal ( Specifies the number of positions scrolled when the user clicks the track. Specifies the text field instance to which the scroll bar applies. Sets the position of the scroll box as an integer between Sets the Specifies a text field as the target for the scroll bar. Sets the length of the scroll bar, in pixels. Specifies the number of positions scrolled when the user clicks a scroll arrow. Sets a single style property for a component.
Method summary for the FScrollBar component
true
if the scroll bar is enabled, false
if it is disabled.
true
) or disabled (false
).
true
) or vertical (false
).
minPos
and maxPos
.
pageSize
, minPos
, and maxPos
properties for the scroll bar. (You cannot use this method with text fields.)
![]() ![]() ![]() |