This content has been marked as final. Show 3 replies
In Actionscript 3 you can just look at the 'numChildren' property of the top movieclip, and use the getChildAt () method to access those children.
In Actionscript 2 you could loop through all the properties of a movieclip to find it's children. Like this:
_root.attachMovie("myClip", "clip1", 10) // attach the top one
_root.clip1.attachMovie("myClip", "clip2", 11) // attach one beneath it
for (var x in _root.clip1) // loop through all the properties of the top clip
trace(x + " " + typeof(_root.clip1[x])) // work out if they are movieclips
That was exactly was I was hoping to find, but was not very well documented.
Don't forget that it is possible – if your project is built that way – that the children can have children as well. So you can do some kind of recursive function that if _root.clip1[x] is a typeof movieclip then check inside it too.