I need to place multiple movie clips into a flash scroll pane component.
The problem I am running into is I need to create thes movie clips dynamically using the attachMovie method.
Here is what I have.
Each movie clip is a draggable 300x100 box with various content inside. My Actionscript could serve up as many as 30 of these movie clips, stacked vertically.
I created a single movie clip to act as the frame and made that 320x700. For testing purposes, I placed that on the stage and gave it an instance name of mcLocationsFrame
Then I wrote the following code.
This works great. When I export the fla the frame is on the screen and the dynamic movie clip instances are stacked vertically inside the frame until they disappear beyond the frame's boundary.
What I need to do is scroll that movie clip frame so I can bring the rest of the dynamic movie clips into view. Since the Scroll Pane component accepts a linkage identifier to a single movie clip symbol in the library, I removed the frame instance from the stage and placed and sized a scroll pane component on the stage. I set the movie clip frame to export and gave it an identifier and placed that identifier in the parameters for the scroll pane.
Now, when I export the fla, I see the movie clip inside the scroll pane (I see the borders), so I know the linkage is correct, but now my attachMovie methods are not working any more. I tried to fiddle with the target in my attachMovie statement to include the instance name of the scroll pane, but I can't figure this out.
Any ideas on how to scroll multiple, dynamically created, movie clips inside a scroll pane component? Preferrably without having to load a seperate swf into the scroll pane component.
Thanks for all your help.
ToddWW
The problem I am running into is I need to create thes movie clips dynamically using the attachMovie method.
Here is what I have.
Each movie clip is a draggable 300x100 box with various content inside. My Actionscript could serve up as many as 30 of these movie clips, stacked vertically.
I created a single movie clip to act as the frame and made that 320x700. For testing purposes, I placed that on the stage and gave it an instance name of mcLocationsFrame
Then I wrote the following code.
Code:
for (var i:Number = 0; i < xmlArray.length; i++) {
var mcTempClip:MovieClip = _root.mcLocationsFrame.attachMovie("mcLocationPanel","mcLocation_"+i,i+1);
mcTempClip._x = 0;
mcTempClip._y = i*100;
}
This works great. When I export the fla the frame is on the screen and the dynamic movie clip instances are stacked vertically inside the frame until they disappear beyond the frame's boundary.
What I need to do is scroll that movie clip frame so I can bring the rest of the dynamic movie clips into view. Since the Scroll Pane component accepts a linkage identifier to a single movie clip symbol in the library, I removed the frame instance from the stage and placed and sized a scroll pane component on the stage. I set the movie clip frame to export and gave it an identifier and placed that identifier in the parameters for the scroll pane.
Now, when I export the fla, I see the movie clip inside the scroll pane (I see the borders), so I know the linkage is correct, but now my attachMovie methods are not working any more. I tried to fiddle with the target in my attachMovie statement to include the instance name of the scroll pane, but I can't figure this out.
Any ideas on how to scroll multiple, dynamically created, movie clips inside a scroll pane component? Preferrably without having to load a seperate swf into the scroll pane component.
Thanks for all your help.
ToddWW