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:
("empcontainer"+(y))._x = (("empcontainer"+(y-1))._x)+ ("empcontainer"+(y-1))._width);