Groups | Blog | Home
all groups > flash actionscript > february 2004 >

flash actionscript : Address all instances of a movie clip at one time


TheKeith
2/13/2004 9:42:19 PM
Is there any way to address all instances of a particular movie clip on the
stage at one time or automatically create an array of all instances, so that
you can cycle through the array addressing each instance individually, much
like the getElementsByName() javascript method? Thanks.

Peo
2/16/2004 10:49:48 AM
Perhaps you could do it like this:

for (i in this){
if (typeof this[i] == "movieclip"){
trace(this[i]);
// do something with the movieclips here
}
}

in this example "this" is the timeline on wich you would like to do
something with all the movieclips.

regards
Peo

AddThis Social Bookmark Button