Scrollpane.hposition - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

You first drag the ScrollPane component from the Components panel to the current
document's library and 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 100 pixels when clicking on horizontal bar.
my_sp.hPageScrollSize = 100;

ScrollPane.hPosition

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
scrollPaneInstance.hPosition
Description
Property; orients the scroll pane's contents in pixels, and adjusts the horizontal scroll box
(thumb) proportionally. The 0 position is at the left end of the scroll track, which causes the
left edge of the scroll pane content to be visible in the scroll pane.
Example
This example creates a ScrollPane instance called
, loads it with an image, and creates a
my_sp
listener to handle the scroll event and display the horizontal (
) and vertical
hPosition
(
) scroll positions as the user clicks the scroll bar.
vPosition
ScrollPane.hPosition
1111

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents