You first drag the ScrollPane component from the Components panel to the current
document's panel and then add the following code to Frame 1:
/**
Requires:
- ScrollPane component in library
*/
this.createClassObject(mx.containers.ScrollPane, "my_sp", 10);
my_sp.setSize(360, 280);
System.security.allowDomain("http://www.helpexamples.com");
my_sp.contentPath = "http://www.helpexamples.com/flash/images/image1.jpg";
// Scroll 20 pixels when clicking on vertical bar arrows.
my_sp.vLineScrollSize = 20;
ScrollPane.vPageScrollSize
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
scrollPaneInstance.vPageScrollSize
Description
Property; the number of pixels to move the content in the display area when the user clicks
the track in a vertical scroll bar. The default value is 20.
Example
This example creates a ScrollPane instance called
, loads it with an image, and sets the
my_sp
property to scroll 30 pixels when the user clicks the track in the vertical
vPageScrollSize
scroll bar.
1120
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