Scrollpane.contentpath - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

ScrollPane.contentPath

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
scrollPaneInstance.contentPath
Description
Property; a string that indicates an absolute or relative URL of the SWF or JPEG file to load
into the scroll pane. A relative path must be relative to the SWF file that loads the content.
If you load content using a relative URL, the loaded content must be relative to the location
of the SWF file that contains the scroll pane. For example, an application using a ScrollPane
component that resides in the directory /scrollpane/nav/example.swf could load contents
from the directory /scrollpane/content/flash/logo.swf by using the following
property:
"../content/flash/logo.swf"
Example
The following example shows how to set the
three different sources: 1) an image on the Internet; 2) a movie clip in the library; 3) a SWF
file from the current working directory. Use only one source at a time.
You first drag the ScrollPane component from the Components panel to the current
document's library. To try option 2, you must create a movie clip in the library and reference
its name. To try option 3, create a SWF file in the current working directory and specify its
name. Then add the following code to Frame 1:
/**
Requires:
- ScrollPane on Stage (instance name: my_sp)
- Symbol with Linkage ID of "movieClip_Name" in the library ** optional
- logo.swf file in the working directory ** optional
*/
System.security.allowDomain("http://www.helpexamples.com");
var my_sp:mx.containers.ScrollPane;
// method 1: JPEG image
my_sp.contentPath ="http://www.helpexamples.com/flash/images/image1.jpg";
1106
ScrollPane component
property to load a ScrollPane from
contentPath
contentPath

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents