# Dynamically Adding Empty MCs to a Container

**URL:** https://forum.kirupa.com/t/dynamically-adding-empty-mcs-to-a-container/290767
**Category:** flash
**Created:** [June 19, 2009, 10:20am UTC](https://forum.kirupa.com/t/dynamically-adding-empty-mcs-to-a-container/290767 "2009-06-19T10:20:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)
#### Post date: [June 19, 2009, 10:20am UTC](https://forum.kirupa.com/t/dynamically-adding-empty-mcs-to-a-container/290767/1 "2009-06-19T10:20:43Z")

</div>

Hi … Rather than typing out each child to add to a container mc, I wish to use a for loop to do so. However, in AS2, when adding an instance of an object, I could specify a unique name based on the current number of the loop. In AS3, I dont know how to even give the same object a unique name if multiple versions a re being pulled from the library to the Stage!

See this step of basic code:: and perhaps someone may have an obvious point to make about the differences of standard procedures, moving from AS2 to AS3::±

```auto
var container:MovieClip = new MovieClip();
var wing:MovieClip = new MovieClip();
addChild(container);
for(var i:int=0;i<3;i++)
{
    container.addChild(wing) /// umm! so how do I add 3! wings each with its own instance name??? Or is not practice in AS3? 
}

```

THANKyou ///
