Is there an easy way to enumerate a MovieClip in ActionScript?
The following example shows how to use a for-in loop to enumerate all the clips that reside on a given timeline. for (var property in myClip) { // Test whether the current property of myClip is a movie clip if (typeof myClip[property] == “movieclip”) { trace(“Found a movie clip: ” + myClip[property]._name); // And do something to the clip myClip[property]._x = 50; } } The for-in loop gives us easy access to the clips contained in a movie. The following example shows a recursive version of the previous example. It provides access to the main clip as well as any nested clips.