Hi mike, You could try these options. 1) The scroll pane within the slice9window movieclip, feed it with another movie (which should not be empty). Do that by going to the parameters options and enter a linkage name. by doing so flash will create an empty movie clip and load the pre-assigned movie clip within it. This might help u attach the other movie clip.
2) within the existing code try executing refreshPane() method. But I am afraid it will reload the scroll pane and all attached data will be lost. 3) contd. From point 1... Lets assume the pre-assigned movie clip's name is "emptyClip" Within the emptyClip movie clip set a global flag / global variable. While the scroll pane is loading emptyClip you would need to check for the global variable. And then execute the rest of the code. i.e. attaching a button and all... Hope this helps. Point 3 is a work around but should help. ____________________________________ Thanks Sumeet Basak CTO Renaissance Legal & Learning Systems Pvt. Ltd. Cell: + 91 9223214301 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of elibol Sent: Wednesday, May 10, 2006 10:29 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] ScrollPain ScrollPain, haha. That's a good pun. Are you sure that the target movieclip you're calling attachMovie is being targeted correctly? btw, I think it's invalidate() and not redraw(). M On 5/10/06, Mike Levy <[EMAIL PROTECTED]> wrote: > > 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 > _______________________________________________ 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 _______________________________________________ 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