Example
The following example creates an instance of a ScrollPane called
, sets
my_sp
vScrollPolicy
to
to prevent a vertical scroll bar from appearing, and loads the ScrollPane with an image.
off
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
*/
import mx.containers.ScrollPane;
this.createClassObject(ScrollPane, "my_sp", 30);
my_sp.setSize(360, 280);
my_sp.vScrollPolicy = "off";
System.security.allowDomain("http://www.helpexamples.com");
my_sp.contentPath = "http://www.helpexamples.com/flash/images/image1.jpg";
ScrollPane.vScrollPolicy
1123