public virtual void addChildAt(AsDisplayObject child, int index)
 {
     if(((index >= 0) && (index <= getNumChildren())))
     {
         child.removeFromParent();
         mChildren.splice(index, (uint)(0), child);
         child.setParent(this);
         child.dispatchEvent(new AsEvent(AsEvent.ADDED, true));
         if(getStage() != null)
         {
             child.dispatchEventOnChildren(new AsEvent(AsEvent.ADDED_TO_STAGE));
         }
     }
     else
     {
         throw new AsRangeError("Invalid child index");
     }
 }
 public virtual void removeChildAt(int index, bool dispose)
 {
     if (index >= 0 && index < getNumChildren())
     {
         AsDisplayObject child = mChildren[index];
         child.dispatchEvent(sRemovedEvent);
         if (getStage() != null)
         {
             child.dispatchEventOnChildren(sRemovedFromStageEvent);
         }
         child.setParent(null);
         mChildren.splice(index, (uint)(1));
         if (dispose)
         {
             child.dispose();
         }
     }
     else
     {
         throw new AsRangeError("Invalid child index");
     }
 }
 public virtual void addChildAt(AsDisplayObject child, int index)
 {
     if (mChildren == null)
     {
         mChildren = new AsVector <AsDisplayObject>();
     }
     if (index >= 0 && index <= getNumChildren())
     {
         child.removeFromParent();
         mChildren.splice(index, (uint)(0), child);
         child.setParent(this);
         child.dispatchEvent(sAddedEvent);
         if (getStage() != null)
         {
             child.dispatchEventOnChildren(sAddedToStageEvent);
         }
     }
     else
     {
         throw new AsRangeError("Invalid child index");
     }
 }
 public virtual void addChildAt(AsDisplayObject child, int index)
 {
     if(mChildren == null)
     {
         mChildren = new AsVector<AsDisplayObject>();
     }
     if(index >= 0 && index <= getNumChildren())
     {
         child.removeFromParent();
         mChildren.splice(index, (uint)(0), child);
         child.setParent(this);
         child.dispatchEvent(sAddedEvent);
         if(getStage() != null)
         {
             child.dispatchEventOnChildren(sAddedToStageEvent);
         }
     }
     else
     {
         throw new AsRangeError("Invalid child index");
     }
 }