# addChild

**URL:** <https://forum.kirupa.com/t/addchild/293825>\
**Category:** Uncategorized\
**Created:** [August 4, 2009, 12:40pm UTC](https://forum.kirupa.com/t/addchild/293825 "2009-08-04T12:40:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lope](https://avatars.discourse-cdn.com/v4/letter/l/43a26b/32.png) [@lope](https://forum.kirupa.com/u/lope)\
**Post date:** [August 4, 2009, 12:40pm UTC](https://forum.kirupa.com/t/addchild/293825/1 "2009-08-04T12:40:48Z")

</div>

(okvir is a movieClip already present on stage)

if I trace them both I get this:

addChild(thumbSprite);  
trace(thumbSprite.parent);  
[object MainTimeline]

okvir.addChild(thumbSprite);  
trace(thumbSprite.parent);  
[object okvir\_2]

how can i ask this:

if(thumbSprite.parent != okvir){  
okvir.addChild(thumbSprite);  
}

and this?

if(thumbSprite.parent != stage){  
addChild(thumbSprite);  
}
