# Attaching multiple MC's into An existing MC

**URL:** <https://forum.kirupa.com/t/attaching-multiple-mcs-into-an-existing-mc/251109>\
**Category:** flash\
**Created:** [February 5, 2008, 1:43pm UTC](https://forum.kirupa.com/t/attaching-multiple-mcs-into-an-existing-mc/251109 "2008-02-05T13:43:35Z")\
**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:** [February 5, 2008, 1:43pm UTC](https://forum.kirupa.com/t/attaching-multiple-mcs-into-an-existing-mc/251109/1 "2008-02-05T13:43:35Z")

</div>

Hi \> I am dynamically placing a bunch of MC’s into one MC via a loop from the Library.

It isn’t working, and I cant understand why not. If I just put them on the \_root, the code works. But when I attach them inside the MC ‘banner’ - Only the last attachment attaches. ☹  
It’s something to do with it’s depth then?! But I have a getNextHighestDepth() firing.

Can you see where I have gone wrong?

```auto
blocks = 20; //no. of blocks in row
bwidth = 31; //block width
row = 2; // no. of rows
for(r=0;r<row;r++){
    
    for(i=0;i<blocks;i++){        
 
banner.attachMovie("block","row"+r+"block"+i,this.getNextHighestDepth(),{_x:(i*bwidth),_y:(r*bwidth)});
    }
}

```

Ideas?
