ActionScript 2.0 Components Language Reference |
|
|
|
| ScrollPane component > Using the ScrollPane component | |||
You can use a scroll pane to display any content that is too large for the area into which it is loaded. For example, if you have a large image and only a small space for it in an application, you could load it into a scroll pane.
You can set up a scroll pane to allow users to drag the content within the pane by setting the scrollDrag parameter 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.
Components such as Loader, ScrollPane, and Window have events to determine when content has finished loading. So, if you want to set properties on the content of a Loader, ScrollPane, or Window component, add the property statement within a "complete" event handler. Consider the following example:
loadtest = new Object();
loadtest.complete = function(eventObject){
content_mc._width= 100;
}
my_scrollpane.addEventListener("complete", loadtest)
For more information, see ScrollPane.content.
|
|
|
|