PDA

View Full Version : Attaching 2 movieclips with mouse press


face2six
06-19-2002, 03:10 PM
Apologies if this has been hashed over but I would like to attach 2 movie clips into the same parent clip with one mouse press

here is the code on the button

on (press) {
_root.main.attachMovie("text2", "newText2", 1);
_root.main.attachMovie("slider", "newslider2", 1);
}

when I do this I only get the second clip , "slider" to attach to the parent clip "main". It seem only the second one listed gets loaded because when I switch the order "text2" loads but "slider" is nowhere to be seen.

Is it not possible to load 2 movieClips with same button press? or am I missing somethng painfully obvious

thanks

face2six
06-19-2002, 03:13 PM
OK I think I figured it out but I dont really understand why it working heres what I did. I changed the level of one of the attached movieclips

FROM THIS:

on (press) {
_root.main.attachMovie("text2", "newname2", 1);
_root.main.attachMovie("slider", "newslider2", 1);
}


TO THIS:

on (press) {
_root.main.attachMovie("text2", "newname2", 1);
_root.main.attachMovie("slider", "newslider2", 2);
}

can some one explain briefly. ITs my understanding that the instances of both clips live at the same level. whaddup?

thanks

pinkaboo
06-19-2002, 03:16 PM
I think you are getting confused with levels and depths.

It's the depth of the clips within the mc that you changed not the level as such.

You can only have one item per depth.