# Correct Syntax

**URL:** <https://forum.kirupa.com/t/correct-syntax/234566>\
**Category:** Uncategorized\
**Created:** [August 3, 2007, 12:32pm UTC](https://forum.kirupa.com/t/correct-syntax/234566 "2007-08-03T12:32:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimjiminyjimjim](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@jimjiminyjimjim](https://forum.kirupa.com/u/jimjiminyjimjim)\
**Post date:** [August 3, 2007, 12:32pm UTC](https://forum.kirupa.com/t/correct-syntax/234566/1 "2007-08-03T12:32:02Z")

</div>

I am trying to position movieclips in a row but each of the loaded content is of different widths. I would like to position each clip so that it touches the edge of the one previously loaded before it. Something like this:

[AS]  
for (y=0; y\<5; y++){

var emptycontainer:MovieClip = \_root.holder.createEmptyMovieClip(“empcontainer”+y,y);  
var container:MovieClip = \_root.holder[“empcontainer”+(y)].attachMovie(“testclip”+y, “instance”+y,this.getNextHighestDepth());

if (y \> 0){  
(“empcontainer”+(y)).\_x = ((“empcontainer”+(y-1)).\_x)+ (“empcontainer”+(y-1)).\_width);  
}

}  
[/AS]

The problem is the position line. I know it doesn’t involve all these brackets but what is the correct syntax:

```auto

("empcontainer"+(y))._x = (("empcontainer"+(y-1))._x)+ ("empcontainer"+(y-1))._width);

```
