# AS: Movieclip creation \_x problem

**URL:** <https://forum.kirupa.com/t/as-movieclip-creation--x-problem/248554>\
**Category:** flash\
**Created:** [January 9, 2008, 5:17pm UTC](https://forum.kirupa.com/t/as-movieclip-creation--x-problem/248554 "2008-01-09T17:17:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dezamp](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@dezamp](https://forum.kirupa.com/u/dezamp)\
**Post date:** [January 9, 2008, 5:17pm UTC](https://forum.kirupa.com/t/as-movieclip-creation--x-problem/248554/1 "2008-01-09T17:17:50Z")

</div>

Hello, I am having a problem with the movieclip positioning along the x axis. As you can see I have used \* to dynamically change each value’s position however the movie clips just end up on top of each other. Please help!!

```auto
_root.createEmptyMovieClip("tab", 1);
function makeTab() {
    tab.createEmptyMovieClip(["tabs"+i], tab.getNextHighestDepth());
    tab["tabs"+i].lineStyle(2, 0xBBBBBB, 100);
    tab["tabs"+i].beginFill(0xEEEEEE, 50);
    tab["tabs"+i].moveTo(5, 0);
    tab["tabs"+i].lineTo(50-5, 0);
    tab["tabs"+i].curveTo(50, 0, 50, 5);
    tab["tabs"+i].lineTo(50, 20-5);
    tab["tabs"+i].curveTo(50, 20, 50, 20);
    tab["tabs"+i].lineTo(0, 20);
    tab["tabs"+i].curveTo(0, 20, 0, 20-5);
    tab["tabs"+i].lineTo(0, 5);
    tab["tabs"+i].curveTo(0, 0, 5, 0);
    tab["tabs"+i].endFill();
    tab["tabs"+i]._x = ((i)%5)+13;
    tab["tabs"+i]._y = 20;
    tab.createTextField(["txt"+i], tab.getNextHighestDepth(),25,22,50,20);
    tab["txt"+i].text = "hello";
}
for (var i = 1; i< 5; i++) {
    bu.onRelease = function() {
        makeTab();
    };
}

```
