Remove all movie clips from a movie clip?

this is probably another really easy one but i feel so stupid and depressed right now (see after question as to why), but anyways, is there a way to remove ALL attached movie clips without knowing what is attached to it? like i have mc1 and i attached either mc2 or mc3 (don’t know which one, well i do, but it could be either or and i want this to be a bit more generic) is there a way to remove the movie clip without specifying mc2 or mc3?

now, why i am depressed… my boss doesn’t think very highly of flash. in fact he thinks all the stuff i have been doing (www.collaborate.saic.com/…lding.swf)) could have been done much easier in .Net… personally i think it would have been harder cuz i’m pretty sure i would have had to figure out how to do it in javascript…

I think that this is how it works :

 for(clips in _root){
        _root[clips].removeMovieClip () ;
}

pom 0]

you could always load them into a container clip and remove that one container clip.
:slight_smile:
jeremy

that’s a good idea lol. one day i might actually be able to think of these things myself :slight_smile:

Pom is on the money. The “for…in” statement is one to learn. Very useful.

for(clips in _root){
_root[clips].removeMovieClip () ;
}

can be anything. If you have a movie clip called “board” with 100 movie clips attached to it, or inside it, called anything at all, this code is perfect for removing them.

for(clips in _root.board){
_root.board[clips].removeMovieClip();
}

etc etc.

Don’t turn your back on the for…in

It is your destiny.

It is your fate.

come to the light side of the force…

alright, I’m just too tired…

lol the second one worked for my needs. at the time he posted the first one, i didn’t understand the clip and the concept of mc’s in mcs enough to get what i needed, but that second one did indeedy work. thanks both :slight_smile:

.NET easier? That’s pretty funny. I work in both, and there is absolutely no way .Net is easier. Well, unless you love looking at that lovely message “Javascript error, Would you like to debug?”.

If you simply need more power(more flexibility in the code) then I would say go to Director. However, most people already have Flash Player on their machine. Shockwave will want you to install the latest version.

Yeah I am glad someone else shares my opinion. My boss is all .Net happy right now and I roll my eyes at that. There is no way I could have done what I have done in this program without using javascript if i used .net. and that’s assuming i didn’t even bother with the nifty color fade and text flying effects.

I know how you feel Upu. A month and still can’t get over it… [smiley of Darth Vader kicking Yoda’s ass]

pom 0]

a post that might also help:
pub40.ezboard.com/fkirupa…=345.topic
:slight_smile:
jeremy