View comments | RSS feed

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 contentPath property: "../content/flash/logo.swf"

Example

The following example tells the scroll pane to display the contents of an image from the Internet:

scrollPane.contentPath ="http://imagecache2.allposters.com/images/43/033_302.jpg";

The following example tells the scroll pane to display the contents of a symbol from the library:

scrollPane.contentPath ="movieClip_Name";

The following example tells the scroll pane to display the contents of the local file logo.swf:

scrollPane.contentPath ="logo.swf";

See also

ScrollPane.content


Comments


Zokbari said on Oct 15, 2004 at 11:03 AM :
It can NOT use movieclip by its contentPath
how can I use this component which include a mc?
jepo said on Oct 18, 2004 at 9:43 AM :
Hi there.
Did you set the Linkage ID of your movie clip? If you create a movie clip, right-click the clip in the Library and select Linkage. Click Export for ActionScript and enter a Linkage ID of "my_mc". Then put the following ActionScript on frame 1 of the Timeline:

my_sp.contentPath ="my_mc";

Then the clip appears in the ScrollPane.

Hope that helps,
Jen d.
wazhoo said on Oct 29, 2004 at 11:53 AM :
And if I want to create dynamicly an empty movie clip with actionscript... Is there a way to set this movieclip as my scrollpane content ?
liquidpixelstudio said on Nov 12, 2004 at 8:41 AM :
why not just create an empty movieclip in the library, and use attachMovie rather than createEmptyMovieClip..... that would solve your ScrollPane issue.
jepo said on Jun 6, 2005 at 7:44 PM :
Thank you for your comments. This site is for documentation feedback only. Some comments with general questions about how to use components, bug reports, or feature requests for the Flash product, have been removed. Please use the Flash webforums for questions about how to use components: http://webforums.macromedia.com/flash. Please use this form for feature requests or suspected bugs: www.macromedia.com/support/email/wishform/.
No screen name said on Aug 24, 2005 at 11:51 PM :
I can NOT use JPG by its contentPath.
Is there a way to see JPG(local) in ScrollPane ?

myScrollPane.contentPath ="./mouse3.jpg";
OR
myScrollPane.contentPath ="mouse3.jpg";

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/mx2004/main_7_2/00002772.html