Detecting or iterating through all movieclips within a on-stage movieclip

How to do this for on-stage MovieClips in authourng view (when they appear in the timeline).

I tried hacking the


MovieClip.prototype=function() {
   trace("detect existence of:"+this);
}
or
MovieClip.prototype.onLoad=function() {
   trace("detect existence of:"+this);
}

But it doesn’t work and onLoad only works if you load something through .swf. onUnload event does work though for the individual sub-mcs.

The only way I’ve seen is to do this.


MovieClip.prototype.onEnterFrame=function() {
    trace("detect existence of:"+this);
   this.onEnterFrame=null;   // deleting this.onEnterFrame doesn't even work!!!
 }

So, what should i do? In Actionscript 3.0, i can simply iterate through the DisplayList. In As2.0, the depths of the on-stage authoring movieclips will not have any particular function to execute upon construction. So, how do i deetect them?