PDA

View Full Version : deleting mc's


rfl
04-01-2002, 10:33 PM
i have a button that duplicates mc's; the code is:

-----------------
on (press) {
i = i + 1;
duplicateMovieClip (ce, "ce" + i, i);//ce is the mc name
}
-----------------
i have another button that i want to delete those duplicates; the code is:

-----------------
on (release) {
while (count >= 0){
removemovieclip(_root.ce + i);
var count;
count= count+1;
}
}
----------------

But this last code doesnt work at all
How can i improve it?
this last code was inspired from here:[url]http://www.macromedia.com/support/flash/ts/documents/random_movie_clip.htm
(but i dont understand it at all)

JHallam
04-02-2002, 12:15 AM
Okay;


on (release) {
removeMovieClip (_root.target["ca"+_root.target.Count]);
_root.target.Count = _root.target.Count-1;

}


That should do the trick

rfl
04-02-2002, 12:21 AM
thanks for helping but it doesnt work...unless i misunderstood: when you write target, what do you mean? the word target or the mc instance name?