# Is a child...yet is not a child

**URL:** https://forum.kirupa.com/t/is-a-child-yet-is-not-a-child/332635
**Category:** Uncategorized
**Created:** [August 29, 2014, 11:06pm UTC](https://forum.kirupa.com/t/is-a-child-yet-is-not-a-child/332635 "2014-08-29T23:06:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![cakepizza](https://avatars.discourse-cdn.com/v4/letter/c/45deac/32.png) [@cakepizza](https://forum.kirupa.com/u/cakepizza)
#### Post date: [August 29, 2014, 11:06pm UTC](https://forum.kirupa.com/t/is-a-child-yet-is-not-a-child/332635/1 "2014-08-29T23:06:50Z")

</div>

Check this crazyness out.  
Frame 1:

```auto
var m:MovieClip=logo; // Frame 1: Only thing on the timeline is a movieClip named "logo"

```

Frame 2:

```auto

//Frame 2: No longer has anything on the timeline
stop();
trace(m.parent); //Traces out: [object MainTimeline]
trace(m.parent.contains(m)); //Traces out : true
try{m.parent.removeChild(m);}catch(e:*){trace(e);} //Traces out : ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
trace(m.parent.addChild(m)); //Traces out : [object MovieClip]
try{m.parent.removeChild(m);}catch(e:*){trace(e);} //Traces out : ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
addChildAt(m,0);
try{trace(getChildAt(0));}catch(e:*){trace(e);} //Traces out : RangeError: Error #2006: The supplied index is out of bounds.

```

WHAAAAAAATTT???
