# Multiple instances of MC's in as3

**URL:** <https://forum.kirupa.com/t/multiple-instances-of-mcs-in-as3/309870>\
**Category:** flash\
**Created:** [May 26, 2010, 3:13pm UTC](https://forum.kirupa.com/t/multiple-instances-of-mcs-in-as3/309870 "2010-05-26T15:13:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jany](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jany](https://forum.kirupa.com/u/jany)\
**Post date:** [May 26, 2010, 3:13pm UTC](https://forum.kirupa.com/t/multiple-instances-of-mcs-in-as3/309870/1 "2010-05-26T15:13:55Z")

</div>

Hello, I need help with making multiple instances of one MC please 😃

- Made a movieclip, and exported as class within Flash so that I can reach it in as3

- Made a button. Every time the button is clicked, that one MC is called upon, and pushed to an array.

- A secondary button is clicked, which uses a FOR loop to calculate how long the array is, and then addChild to every element of the array.

\*Problem - Everytime addChild is used, it replaces it. Although I clicked the first button, say 5 times. There should now be 5 elements in the array, which there are. After the secondary button is clicked, it addChild the elements but only shows 1 on the screen because it gets replaced.

How do I get around this? Adding a container? I have done this before too, so it is frustrating I forget how. :doh:

tyty
