# Help duplicating MCs

**URL:** https://forum.kirupa.com/t/help-duplicating-mcs/158972
**Category:** Uncategorized
**Created:** [August 13, 2005, 8:19am UTC](https://forum.kirupa.com/t/help-duplicating-mcs/158972 "2005-08-13T08:19:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![CayoHueso](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@CayoHueso](https://forum.kirupa.com/u/CayoHueso)
#### Post date: [August 13, 2005, 8:19am UTC](https://forum.kirupa.com/t/help-duplicating-mcs/158972/1 "2005-08-13T08:19:41Z")

</div>

Hi everybody,

I am trying to figure out a script to place duplicated MCs in a row, without space between copies. The problem is that when the MC is duplicated, each copy has different \_width values, so I have been trying to calculate how to do this, but I haven’t been able to find a solution. Could anyone help me with this?

Thanks a lot.

```auto

var initialX:Number = 325;
var initialY:Number = 73;
for (i = 1; i < 5; i++) {
	var name:String = "tabButton" + i + "_mc";
	var previousName:String = "tabButton" + (i - 1) + "_mc";
	_root.tab_mc.duplicateMovieClip(name, i);
	_root[name]._x = _root[previousName]._x + _root[previousName]._width;
	_root[name]._y = _root.initialY;
}

```
