# Help with attaching MCs

**URL:** <https://forum.kirupa.com/t/help-with-attaching-mcs/196235>\
**Category:** programming\
**Created:** [August 7, 2006, 3:14am UTC](https://forum.kirupa.com/t/help-with-attaching-mcs/196235 "2006-08-07T03:14:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![habes](https://avatars.discourse-cdn.com/v4/letter/h/e5b9ba/32.png) [@habes](https://forum.kirupa.com/u/habes)\
**Post date:** [August 7, 2006, 3:14am UTC](https://forum.kirupa.com/t/help-with-attaching-mcs/196235/1 "2006-08-07T03:14:38Z")

</div>

i have this code on a button, to duplicate my marines in a real time strategy setting…

```auto

[LEFT]onClipEvent (load) {
    marineCount = 1;
}
on (release) {
    _root.map.attachMovie("marine", "marine"+marineCount, this.getNextHighestDepth());
    marineCount += 1;
}
[/LEFT]
   

```

[LEFT]  
[/LEFT]

is there a reason it reattaches the same mc instead of creating a new one? do i have to use duplicateMovieClip?  
fla included, thanks
