MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 1109

Components language reference
Table of Contents

Advertisement

Usage
scrollPaneInstance.content
Description
Read-only property; a reference to the content of the scroll pane. The value is
until the load begins.
Example
This example sets the
technically, a movie clip containing a JPEG image). It also creates a numeric stepper that the
user can increment or decrement by 10, up to a value of 100. When the user changes the value
in the NumericStepper, a listener sets the transparency (
specified percentage. Note that
You first drag ScrollPane and NumericStepper components from the Components panel to
the current document's library and then add the following code to Frame 1:
/**
Requires:
- ScrollPane in library
- NumericStepper in library
*/
System.security.allowDomain("http://www.helpexamples.com");
this.createClassObject(mx.controls.NumericStepper, "my_nstep", 10,
{minimum:10, maximum:100, stepSize:10});
my_nstep.value = my_nstep.maximum;
this.createClassObject(mx.containers.ScrollPane, "my_sp", 20);
my_sp.move(0, 30);
my_sp.setSize(180, 160);
my_sp.contentPath = "http://www.helpexamples.com/flash/images/image2.jpg";
var nstepListener:Object = new Object();
nstepListener.change = function(evt_obj:Object) {
my_sp.content._alpha = my_nstep.value;
}
my_nstep.addEventListener("change", nstepListener);
See also
ScrollPane.contentPath
property to load a scroll pane with a picture (or
contentPath
is a MovieClip property.
_alpha
) of the image to the
content._alpha
ScrollPane.content
undefined
1105

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents