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