If the movieclip only contains the scrollpane, wy not attach the scrollpane directy, instead of having it wrapped in a movieclip?
The scrollpane has a 'complete' event which is triggered when it's content is ready to be used, so that might be what you're looking for (it's in the docs). Any particular reason why you're using spContentHolder instead of just ScrollPane.content (which is also documented)? regards, Muzak ----- Original Message ----- From: "Mike Levy" <[EMAIL PROTECTED]> To: "'Flashcoders mailing list'" <flashcoders@chattyfig.figleaf.com> Sent: Wednesday, May 10, 2006 6:24 PM Subject: [Flashcoders] ScrollPain > Hi All, > > I have the following code in AS2 Class files. (no code on timelines) > The function below is a button handler for a Class that extends MovieClip. > > In the button handler function, I am attaching a movieClip that has a public > ScrollPane so that I can add content to it from this function. When I use > attachMovie to add a button to the ScrollPane, the button does not appear. > However the 2nd time the function is called, the button does appear? > > // button handler for a movieClip to create a popup style window > function dgAdd(evt:Object){ > this.attachMovie("Slice9Window","Slice9Window", > this.getNextHighestDepth()); > this["Slice9Window"]["pane"].contentPath = "mv_form_no_builder"; > var mvScroller:MovieClip = this["Slice9Window"]["pane"].spContentHolder; > > mvScroller.attachMovie("Button","the_button",mvScroller.getNextHighestDepth( > )); > mvScroller["the_button"].label = "Does this work"; > mvScroller.redraw(); // this didn't help > } > > Also, spConentHolder is undocumented, but I have used this in the past. > Compiling with Flash 8 pro. > > Thanks for any explanations! I think it has something to do with the > movieClip not loading by the time I call attachMovie, but I read on another > thread that if everything is in class files that there is no timing issues > with attachMovie. > > mike _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com