In my movie, I have the following code:
[color=red]myscrollpane.contentPath = “myclip”;[/color]
myClip is imported into the library.
[color=darkorange][/color]
in the first keyframe for myclip
[color=red]for (…) {[/color]
[color=red] createEmptyMovieClip(this[“mc_” + i], i);
//set all sorts of properties
…
this[“mc_” + i].loadMovie(url);
…[/color]
[color=red]}[/color]
The loop executes and dynamically creates a bunch of movieclip objects and places them in the myclip movieclip. The problem is that many of the dynamically created movieclips that are loaded in myclip are outside of the scrollpane window but the scrollpane doesn’t make a scrollbar.
I suspected that is is because the scrollPane instance doesn’t know the height and width of myclip. When you use [color=red]myscrollpane.contentPath = “myclip”[/color] the scrollpane duplicates myclip in a movieclip named spContentHolder.
I confirmed that the scrollpane doesn’t know the dimensions of the movieclip that used “contentPath” on with a [color=red]trace(this._name + this._height)[/color] returning 0 for spContentHolder.
I tried placing [color=red]this._height = myHeight[/color] in mc_myclip, but spContentHolder still returned a height of 0.
How on earth can I set the contentPath of a scrollPane instance to a movieclip and have the scrollPane adjust the scrollbars as the movieclip loads movies dynamically?
This is driving me nuts.