Or you could simply put all your movieclips into a container movieclip
and remove that one movieclip rather than iterating through and removing
each movieclip one at a time.
Steven Sacks
Flash Maestro
Los Angeles, CA
--
blog: http://www.stevensacks.net
Omar Fouad wrote:
If i get your explanation you are going to index the instance name of each
childMc inside an array, to later delete mcArray[0], mcArray[1],mcArray[2]
and so on as in:
mcArray[0] = mc1.mc2;
and so on...
in this case try:
unloadMovie(mcArray[0]); // will delete the mc2 inside mc1
Note that this will remove the movieclip visually only, so you'll have to
add a delete statement after it as:
//let's assume you have a button that does it
mcArray = [];
mcArray[0] = mc1.mc2;
but.onRelease = function () {
unloadMovie(mcArray[0]);
trace(mcArray[0]); // traces _level0.mc1.mc2
delete mcArray[0]; // deletes the movieClip referred to the array
index 0, not the value of the array element itself!
trace(mcArray[0]); // traces undefined.
}
hope this helps...
cheers
On 9/4/07, Eduardo Barbosa <[EMAIL PROTECTED]> wrote:
Hi Alexander,
What I usually do is, at the same time that the child MCs are created,
write
them one after the other in an empty array that then you'll later call,
run
through it and delete all its contents.
Makes sense?
Let me know if you want me to copy paste some code I've written for your
reference.
Cheers!
Eduardo
_______________________________________________
[email protected]
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
_______________________________________________
[email protected]
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