# AS2 - AS3:: adding MC's to a 'container' MC

**URL:** <https://forum.kirupa.com/t/as2-as3-adding-mcs-to-a-container-mc/289195>\
**Category:** flash\
**Created:** [May 27, 2009, 12:33pm UTC](https://forum.kirupa.com/t/as2-as3-adding-mcs-to-a-container-mc/289195 "2009-05-27T12:33:30Z")\
**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:** [May 27, 2009, 12:33pm UTC](https://forum.kirupa.com/t/as2-as3-adding-mcs-to-a-container-mc/289195/1 "2009-05-27T12:33:30Z")

</div>

Hi Im new to AS3 from AS2… and am learning the basics…

I know now how to add a load of MCs from the library to the stage.

Do I still use MovieClips!!!?  
I have a simple question::: How do I populate a ‘container’ MC with ‘instances’ from the library? I know i am using AS2 lingo, but it is to make my point clear. I understand that you gotta get into classes with AS3 …

Before in AS2 I would …

```auto
_root.createEmptyMovieClip("newName",1);
newName.attachMovie("blar","blar",etc);

```

in AS3::: and cutting to the chase without referencing packages, importing etc … just straigth to the particular part of the code::

```auto
var cont:MovieClip = new MovieClip();    
for (var i:int = 0; i < 10; i++)
{    
   var newMC:myOBJ = new myOBJ();
   cont.addChild(newMC);
   newMC.x = Math.random()*300;   
}

```

Is that right? ! Thanks;(
