# Adding multiple different movieclips with AS

**URL:** <https://forum.kirupa.com/t/adding-multiple-different-movieclips-with-as/318427>\
**Category:** Uncategorized\
**Created:** [January 19, 2011, 10:47pm UTC](https://forum.kirupa.com/t/adding-multiple-different-movieclips-with-as/318427 "2011-01-19T22:47:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndrewK](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@AndrewK](https://forum.kirupa.com/u/AndrewK)\
**Post date:** [January 19, 2011, 10:47pm UTC](https://forum.kirupa.com/t/adding-multiple-different-movieclips-with-as/318427/1 "2011-01-19T22:47:42Z")

</div>

Hi i have this problem:

Basically i want to go from this:

```auto
function SomeFunction():void
{
var mc1:Mc1 = new Mc1();
addChild(mc1);
mc1.x = 100;
mc1.y = 100;

var mc2:Mc2 = new Mc2();
addChild(mc2);
mc2.x = 100;
mc2.y = 100;

var mc3:Mc2 = new Mc3();
addChild(mc3);
mc3.x = 150;
mc3.y = 150;

var mc4:Mc4 = new Mc4();
addChild(mc4);
mc4.x = 200;
mc4.y = 200;

```

etc…  
etc…

to Something like this:

```auto
for (i:int = 0; i < 7; i++)
{
var mc **i** :Mc **i** = new Mc **i** ();
addChild(mc **i** );
mc **i**.x = 100 + i * 50;
mc **i**.y = 100 + i * 50;

}

```

I have been trying for some time to make something like this work but i just can’t seem to do it properly.

And also all the movieClips are different NOT 7 instances of the same movieClip
