# Dynamicly name mc instances

**URL:** <https://forum.kirupa.com/t/dynamicly-name-mc-instances/277095>\
**Category:** flash\
**Created:** [December 7, 2008, 8:05pm UTC](https://forum.kirupa.com/t/dynamicly-name-mc-instances/277095 "2008-12-07T20:05:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kloucek](https://avatars.discourse-cdn.com/v4/letter/k/7c8e57/32.png) [@Kloucek](https://forum.kirupa.com/u/Kloucek)\
**Post date:** [December 7, 2008, 8:05pm UTC](https://forum.kirupa.com/t/dynamicly-name-mc-instances/277095/1 "2008-12-07T20:05:07Z")

</div>

So the problem is this:  
I want to place 24 instances of the same movie clip on stage in a grid 6 by 4.  
I’m doing that using a loop:

```auto
            for (var i:uint=1 ; i<=24 ; i++){
                for (var x:uint=0 ; x <6 ; x++ ){
                    for (var y:uint=0 ; y<4 ; y++){
                        var c:Tile = new Tile();
                        c.stop();
                        c.x = x*63;
                        c.y = y*63;
                        var r:uint = Math.floor(Math.random()*24);
                        
                        addChild(c);

```

What i would like to achieve is give a name to eveny next instance (Tile1, Tile2, Tile3)so i could have one of 24 tiles differ from other (go to frame 2 f.ex.).  
No idea how to do that. Please help… 😉
