# Help making distance between all mcs at equal distance from each other on mouseover

**URL:** <https://forum.kirupa.com/t/help-making-distance-between-all-mcs-at-equal-distance-from-each-other-on-mouseover/315064>\
**Category:** flash\
**Created:** [October 16, 2010, 3:42pm UTC](https://forum.kirupa.com/t/help-making-distance-between-all-mcs-at-equal-distance-from-each-other-on-mouseover/315064 "2010-10-16T15:42:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adBuryD](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@adBuryD](https://forum.kirupa.com/u/adBuryD)\
**Post date:** [October 16, 2010, 3:42pm UTC](https://forum.kirupa.com/t/help-making-distance-between-all-mcs-at-equal-distance-from-each-other-on-mouseover/315064/1 "2010-10-16T15:42:46Z")

</div>

hi  
I am posting my code that attaches the movieclips on stage

```auto
function attachMovieClip ()
{
	for (var i:int=0; i<10; i++)
	{
		var newMc:mcContainer = new mcContainer();
		newMc.y = 100;
		newMc.x = 0 + (newMc.width*i) + (i*10);
	        newMc.name = 'g_'+i.toString();
		newMc.addEventListener (MouseEvent.MOUSE_OVER,expand);
		newMc.addEventListener (MouseEvent.MOUSE_OUT,contract);

		addChild (newMc);

	}
}

```

i was hoping that when the newMc expands, all other mc would keep the same distance between each other as at initialisation. I not able to figure how to do it.

Any help would be very much appreciated. maybe even an earlier post or llink where similar query was explained.

Thank you
