all groups > flash actionscript > june 2004 >
You're in the

flash actionscript

group:

duplicated movie clips: removing them!



duplicated movie clips: removing them! gdiesh NO[at]SPAM gmail.com
6/20/2004 5:46:06 PM
flash actionscript: tried to post earlier--hopefully was able to cancel that post--as I
missed some info:

I have duplicated movieclips using this script, within a function
myClip = list_holder.attachMovie("duplicatedClip", "duplicatedClip"+i,
i);

same frame, different function: I am trying to remove all instances of
the duplicated movie clip by doing this:
for (i=1;i<totalmovieclips;i++){
"list_holder.duplicatedClip"+i.removeMovieClip ();

}

both functions are called from buttons sitting at the same level
within the movie (root).

any help would be appreciated and I would be happy to send the file to
anyone who would want to take a look

Re: duplicated movie clips: removing them! kglad
6/21/2004 1:38:16 AM
for (i=1;i<totalmovieclips;i++){
"list_holder[duplicatedClip"+i].removeMovieClip ();

Re: duplicated movie clips: removing them! lost1head NO[at]SPAM yahoo.com
6/21/2004 11:48:14 AM
tried this:
function duplicateIt() {
for(i=1;i<5;i++){
myClip = list_holder.attachMovie("duplicatedClip",
"duplicatedClip"+i, i);
}
}
function removeIt() {
for (i=1;i<5;i++){
trace("inside loop");
"list_holder"["duplicatedClip"+i].removeMovieClip();

}}

and still movies are not going away! there was a problem with the
syntax that you had posted kglad, so I tried to fic it--did I do it
correctly? see placment of quotes in function removeit.

thanks!


[quoted text, click to view]
Re: duplicated movie clips: removing them! lost1head NO[at]SPAM yahoo.com
6/21/2004 11:49:40 AM
for the benefit of the group--I found the problem: the fix is:

function removeIt() {
for (i=1;i<5;i++){
trace("inside loop");
list_holder["duplicatedClip"+i].removeMovieClip();

}}

[quoted text, click to view]
Re: duplicated movie clips: removing them! kglad
6/22/2004 1:29:23 AM
AddThis Social Bookmark Button