View comments | RSS feed

ScrollPane.content

Availability

Flash Player 6 (6.0 79.0).

Edition

Flash MX 2004.

Usage

scrollPaneInstance.content

Description

Property (read-only); a reference to the content of the scroll pane. The value is undefined until the load begins.

Example

This example sets the mcLoaded variable to the value of the content property:

var mcLoaded = scrollPane.content;

See also

ScrollPane.contentPath


Comments


Gregory R. said on Oct 29, 2004 at 7:40 AM :
A quick look through the ScrollPane class and you can see that
spContentHolder is clip being loaded when you call contentPath. That
would probably be short for "ScrollPane Content Holder." So, what you
need to do is create the holder.

spContentHolder = testScrollPane.createChild("ClassOrLinkageName",
"spContentHolder", optionalInitObj );

The createChild method call creates a child using either
UIObject.createObject() or UIObject.createClassObject() depending on
what you have passed. The third parameter is the optional initialization.

With a little more hacking, you could easily use attachMovie or
createEmptyMovieClip instead of createChild. You just need to call the
childLoaded method when you are done so that things know what has
been done. If you do this, note that the depth should be set as
mx.managers.DepthManager.kBottom (which is where ScrollPane puts it
anyway).
Marcus Vorwaller said on May 18, 2005 at 6:11 AM :
Richard posted this here: http://www.highdots.com/forums/threadnav388678-5-10.html

I created a ScrollPane component in Scene 1 and gave it an instance name of 'scrollPane'. I also created a blank movie clip called 'ScrollPaneContent', set it to export for actionscript and gave it a linkage identifier.

scrollPane.contentPath = "ScrollPaneContent";
scrollPaneContent = scrollPane.spContentHolder;
scrollPaneContent.createTextField("foo", 0, 0, 0, 50, 20);
scrollPaneContent.foo.text = "bar";

Which I found to be extremely helpful and relevant.
jepo said on Jun 6, 2005 at 7:42 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/.

 

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/00002771.html