You first drag the ScrollPane component from the Components panel to the current
document's library and then add the following code to Frame 1:
/**
Requires:
- ScrollPane component in library
*/
this.createClassObject(mx.controls.Button, "my_button", 10,
{label:"Refresh"});
this.createClassObject(mx.containers.ScrollPane, "my_sp", 20);
my_sp.move(0, 30);
my_sp.setSize(360, 280);
var buttonListener:Object = new Object();
buttonListener.click = function(evt_obj:Object) {
my_sp.refreshPane();
}
my_button.addEventListener("click", buttonListener);
System.security.allowDomain("http://www.helpexamples.com");
my_sp.contentPath = "http://www.helpexamples.com/flash/images/image1.jpg";
ScrollPane.scroll
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
Usage 1:
var listenerObject:Object = new Object();
listenerObject.scroll = function(eventObject:Object):Void {
// ...
};
scrollPaneInstance.addEventListener("scroll", listenerObject);
Usage 2:
on (scroll) {
// ...
}
1116
ScrollPane component
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers