# Adding multiple MC's via a class

**URL:** https://forum.kirupa.com/t/adding-multiple-mcs-via-a-class/302217
**Category:** flash
**Created:** [December 23, 2009, 5:26pm UTC](https://forum.kirupa.com/t/adding-multiple-mcs-via-a-class/302217 "2009-12-23T17:26:45Z")
**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: [December 23, 2009, 5:26pm UTC](https://forum.kirupa.com/t/adding-multiple-mcs-via-a-class/302217/1 "2009-12-23T17:26:45Z")

</div>

Hello, in my Doc Class I am trying to load in multiple MCs onto the stage which come from a class held in the library …  
I get an error whilst trying to name them … perhaps it too much of an AS2 way? …If someone could help!\>?  
ps code is only a snippet of the problem…

```auto

for (var m:uint = 5; m > 0; m--) 
{
   //var obj:Item = new Item(200); this works - but I want to name each MC
   var ["thumb"+m]:Item = new Item(200);
}

```

:nose:
