Child can't remove itself

So try running a test where you’ve placed several copies of a movieclip on the stage in the authoring environment and then linked the clip to this class:

package {
 import flash.display.*
 import flash.events.*;
 public class ClassTest extends MovieClip {
  public function ClassTest():void {
   trace(name);
   parent.removeChild(this);
  }
 }
}

The first clip will remove itself but the rest won’t. The trace statement in the contructor isn’t even executed which indicates that the other clips aren’t even contructed.

So I suppose Flash has some method of contructing all the clips which were placed in the authoring environment and it involves counting the clips and noting their position on the display list. So removing a clip during the process of constructing them will disrupt the process by altering the display list. Am I right? Does anyone know about this?

But it gets even weirder. Try adding a click event listener to the stage. The clips won’t respond at all. But it’s not like they’re just not mouse enabled, because if they were then the stage would still respond when you clicked them because you’d be clicking what was behind them. Instead they block any mouse events from reaching behind them. So not only are they not constructed, they obstruct any mouse events from occuring in their space, and they’re still visible.

I also just discovered that the same applies to all clips that are to be contructed afterwards, regardless of whether they’re the same class.

Can anyone explain this to me?