# addChild method

**URL:** <https://forum.kirupa.com/t/addchild-method/322153>\
**Category:** flash\
**Created:** [May 12, 2011, 11:12am UTC](https://forum.kirupa.com/t/addchild-method/322153 "2011-05-12T11:12:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![virtuoz69](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@virtuoz69](https://forum.kirupa.com/u/virtuoz69)\
**Post date:** [May 12, 2011, 11:12am UTC](https://forum.kirupa.com/t/addchild-method/322153/1 "2011-05-12T11:12:07Z")

</div>

hi guys,

i’m very new in AS3 and i’m still in process of learning and i have question, which is probably very simple. Situation is next, i have two movie clips and both are rectangle shape, one is for background , and other is smaller one, and i with method addchild() add smaller to bigger one. Why the smaller rectangle lose his position and shape (he has much bigger height)

var big:Rectangle1=new Rectangle1(); //big  
big.x=150;  
addChild(big);

var small:Rectangle2=new Rectangle2(); //small  
small.x=100;  
big.addChild(small);

//small lose his shape and position, his position it’s not on 100px from left side of big and he also lose his shape
