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…
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();
}
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
.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.