# Adding multiple unique moveiClips from library

**URL:** <https://forum.kirupa.com/t/adding-multiple-unique-moveiclips-from-library/309740>\
**Category:** flash\
**Created:** [May 23, 2010, 8:39pm UTC](https://forum.kirupa.com/t/adding-multiple-unique-moveiclips-from-library/309740 "2010-05-23T20:39:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tyg3r](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tyg3r/32/1341_2.png) [@Tyg3r](https://forum.kirupa.com/u/Tyg3r)\
**Post date:** [May 23, 2010, 8:39pm UTC](https://forum.kirupa.com/t/adding-multiple-unique-moveiclips-from-library/309740/1 "2010-05-23T20:39:06Z")

</div>

Hiya,

In my library, I have a range of movieClips each with a different linkage: MC1, MC2, MC3, MC4, and MC5.

I’m attempting to add these MovieClips from the library, to the stage, using a single for loop. But I haven’t got the faintest idea of how I can do this.

```auto
for (var i:Number = 0; i < 5; i++) {
	var myBtn:MC* = new MC*(); // This is the line causing the problem
	myBtn.x = i * 327.8;
	myBtn.id = i;
	myBtn.name = "button" + i;
	addChild (myBtn);
}

```

All ideas are greatly appreciated. Cheers.

Mark Notton
