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);
Note: The code trace(myScrollPaneInstance.version); returns undefined.
The following table lists methods of the ScrollPane class.
| Method | Description |
|---|---|
|
Returns the number of bytes of content loaded. |
|
|
Returns the total number of bytes of content to be loaded. |
|
|
Reloads the contents of the scroll pane. |
The following table lists the methods the ScrollPane class inherits from the UIObject class. When calling these methods from the ScrollPane object, use the form ScrollPaneInstance.methodName.
| Method | Description |
|---|---|
|
Creates an object on the specified class. |
|
|
Creates a subobject on an object. |
|
|
Destroys a component instance. |
|
|
Calls a function when parameters have been set in the Property and Component inspectors. |
|
|
Gets the style property from the style declaration or object. |
|
|
Marks the object so it will be redrawn on the next frame interval. |
|
|
Moves the object to the requested position. |
|
|
Forces validation of the object so it is drawn in the current frame. |
|
|
Resizes the object to the requested size. |
|
|
Sets a skin in the object. |
|
|
Sets the style property on the style declaration or object. |
The following table lists the methods the ScrollPane class inherits from the UIComponent class. When calling these methods from the ScrollPane object, use the form ScrollPaneInstance.methodName.
| Method | Description |
|---|---|
|
Returns a reference to the object that has focus. |
|
|
Sets focus to the component instance. |
The following table lists properties of the ScrollPane class.
| Method | Description |
|---|---|
|
A reference to the content loaded into the scroll pane. |
|
|
An absolute or relative URL of the SWF or JPEG file to load into the scroll pane. |
|
|
The amount of content to scroll horizontally when a scroll arrow is clicked. |
|
|
The amount of content to scroll horizontally when the scroll track is clicked. |
|
|
The horizontal pixel position of the scroll pane's horizontal scroll bar. |
|
|
The status of the horizontal scroll bar. It can be always on ( |
|
|
Indicates whether scrolling occurs ( |
|
|
The amount of content to scroll vertically when a scroll arrow is clicked. |
|
|
The amount of content to scroll vertically when the scroll track is clicked. |
|
|
The pixel position of the scroll pane's vertical scroll bar. |
|
|
The status of the vertical scroll bar. It can be always on ( |
The following table lists the properties the ScrollPane class inherits from the UIObject class. When accessing these properties from the ScrollPane object, use the form ScrollPaneInstance.propertyName.
| Property | Description |
|---|---|
|
The position of the bottom edge of the object, relative to the bottom edge of its parent. Read-only. |
|
|
The height of the object, in pixels. Read-only. |
|
|
The left edge of the object, in pixels. Read-only. |
|
|
The position of the right edge of the object, relative to the right edge of its parent. Read-only. |
|
|
A number indicating the scaling factor in the x direction of the object, relative to its parent. |
|
|
A number indicating the scaling factor in the y direction of the object, relative to its parent. |
|
|
The position of the top edge of the object, relative to its parent. Read-only. |
|
|
A Boolean value indicating whether the object is visible ( |
|
|
The width of the object, in pixels. Read-only. |
|
|
The left edge of the object, in pixels. Read-only. |
|
|
The top edge of the object, in pixels. Read-only. |
The following table lists the properties the ScrollPane class inherits from the UIComponent class. When accessing these properties from the ScrollPane object, use the form ScrollPaneInstance.propertyName.
| Property | Description |
|---|---|
|
Indicates whether the component can receive focus and input. |
|
|
A number indicating the tab order for a component in a document. |
The following table lists events of the ScrollPane class.
| Event | Description |
|---|---|
|
Broadcast when the scroll pane content is loaded. |
|
|
Broadcast while the scroll pane content is loading. |
|
|
Broadcast when the scroll bar is clicked. |
The following table lists the events the ScrollPane class inherits from the UIObject class.
| Event | Description |
|---|---|
|
Broadcast when an object is about to draw its graphics. |
|
|
Broadcast when an object's state changes from visible to invisible. |
|
|
Broadcast when subobjects are being created. |
|
|
Broadcast when the object has moved. |
|
|
Broadcast when an object has been resized. |
|
|
Broadcast when an object's state changes from invisible to visible. |
|
|
Broadcast when the subobjects are being unloaded. |
The following table lists the events the ScrollPane class inherits from the UIComponent class.
| Event | Description |
|---|---|
|
Broadcast when an object receives focus. |
|
|
Broadcast when an object loses focus. |
|
|
Broadcast when a key is pressed. |
|
|
Broadcast when a key is released. |
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/mx2004/main_7_2/00002769.html
Comments
No screen name said on Aug 18, 2004 at 2:23 PM : metric152 said on Aug 20, 2004 at 12:37 PM : Zokbari said on Oct 19, 2004 at 12:39 PM : einaros said on Nov 18, 2004 at 4:37 AM : antoine_viso said on Dec 7, 2004 at 9:59 AM : superstooge said on Dec 14, 2004 at 2:52 AM :