Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is there an easy way to enumerate a MovieClip in ActionScript?

0
Posted

Is there an easy way to enumerate a MovieClip in ActionScript?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123