# Need help with spacing out movieclips created with addChild

**URL:** https://forum.kirupa.com/t/need-help-with-spacing-out-movieclips-created-with-addchild/312660
**Category:** flash
**Created:** [August 10, 2010, 4:03am UTC](https://forum.kirupa.com/t/need-help-with-spacing-out-movieclips-created-with-addchild/312660 "2010-08-10T04:03:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![waseem](https://avatars.discourse-cdn.com/v4/letter/w/9dc877/32.png) [@waseem](https://forum.kirupa.com/u/waseem)
#### Post date: [August 10, 2010, 4:03am UTC](https://forum.kirupa.com/t/need-help-with-spacing-out-movieclips-created-with-addchild/312660/1 "2010-08-10T04:03:22Z")

</div>

So I’m adding these movieclips which have textfields inside them and I’m trying to space each new movieclip. Currently they are being placed on top of each other.  
\_taskX and \_taskY are variables which I define down there. Thanks for the help!

```auto
public function onClick(event:MouseEvent):void
        {
            _taskX = 300;
            _taskY = 100;
            
            _newTask = inputTask_txt.text;
            _task = new Task();
            _task.x = _taskX;
            _task.y = _taskY;
            _taskY += _task.height + 20;
            _task.taskName_txt.text = _newTask;
            addChild(_task);
            ;
            
        }

```
