Hi all - I have a bit of an overwhelming problem (at least for me).
I have a system that I am using a scrollpane with that dynamically creates a movie and loads it into the scrollpane. The problem I am asking about come when I try to change that content via a "Next Page" style system.
I have been loading the scollpane like this:
Code:
codeDisplay.code_sp.createChild("Empty", "spContentHolder", initObject);
sp = codeDisplay.code_sp.spContentHolder;
spContent = sp.createEmptyMovieClip("content_mc", 5);
I have had a lot of success with this method (while I have no idea how it works). I could then add information into the scrollpane (which is on the stage as "codeDisplay") as follows:
Code:
for (i = 0; i < dataSet.length; i++) {
line = spContent.createEmptyMovieClip(["content"+i], i);
//Blah, blah, blah
}
So this is all in a function, and when someone clicks "next page" it adjusts the parameters of the for loop and runs the function again. What happens at that point is interesting.
The scrollpane works perfectly (that is there is information that scrolls), and the information loads perfectly as well. The problem is that the information extends above and below the borders of the pane. It is like a big strip of information that takes up the entire height of the movie.
As this was not working, I tried correnting one potential problem. I took the sp.createChild command out of the function so that it wouldn't be called again. The idea was to then that I would just be changing the content of the base mc, but not trying to recreate the elements of the scrollpane. Well, what happened was suprising. The information changed, the information stayed within the scrollpane border, but 1) the scroller on the scrollpane stayed at the botton and I don't know how to send it up, and 2) the scrollpane height did not change - that is, I frequently found a lot of blank space at the bottom of the scrollpane, ovbiously depending on the amount of information (varible in height) loaded on any subsequent pages.
So... does anyone have a wealth of knowledge or some inciteful suggestions for me?
Thanks in advance!