User Guide

1098 ScrollPane component
ScrollPane class
Inheritance MovieClip > UIObject class > UIComponent class > View > ScrollView >
ScrollPane
ActionScript Class Name mx.containers.ScrollPane
The properties of the ScrollPane class let you do the following at runtime: set the content,
monitor the loading progress, and adjust the scroll amount.
Setting a property of the ScrollPane class with ActionScript overrides the parameter of the
same name set in the Property inspector or Component inspector.
You can set up a scroll pane so that users can drag the content within the pane. To do this, set
the
scrollDrag property to true; a pointing hand appears on the content. Unlike most other
components, events are broadcast when the mouse button is pressed and continue
broadcasting until the button is released. If the contents of a scroll pane have valid tab stops,
you must set
scrollDrag to false; otherwise, each mouse interaction with the contents will
invoke scroll dragging.
Each component class has a
version property, which is a class property. Class properties are
available only on the class itself. The
version property returns a string that indicates the
version of the component. To access this property, use the following code:
trace(mx.containers.ScrollPane.version);
Method summary for the ScrollPane class
The following table lists methods of the ScrollPane class.
NOTE
The code trace(myScrollPaneInstance.version); returns undefined.
Method Description
ScrollPane.getBytesLoaded() Returns the number of bytes of content loaded.
ScrollPane.getBytesTotal() Returns the total number of bytes of content to be loaded.
ScrollPane.refreshPane() Reloads the contents of the scroll pane (but does not redraw
the scroll bar).