# duplicateMovieClip question

**URL:** <https://forum.kirupa.com/t/duplicatemovieclip-question/189193>\
**Category:** flash\
**Created:** [May 14, 2006, 11:42pm UTC](https://forum.kirupa.com/t/duplicatemovieclip-question/189193 "2006-05-14T23:42:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shiftedfocus](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@shiftedfocus](https://forum.kirupa.com/u/shiftedfocus)\
**Post date:** [May 14, 2006, 11:42pm UTC](https://forum.kirupa.com/t/duplicatemovieclip-question/189193/1 "2006-05-14T23:42:31Z")

</div>

Hey,

I have a problem with a application I am developing. Basically what happens so far is.

I have created a MovieClip in the library that consist of buttons, graphics and other MovieClips. When the movie starts I attach this movie clip to a newly createdEmptyMovieclip like so

```auto

_root.createEmptyMovieClip("Master", getNextHighestDepth());
_root.Master.attachMovie("flip0", "flip0", 30);

```

Then I duplicate the MovieClip for the number of records in the XML file:

```auto

for (a=1; a<noCards; a++) {
            _root.Master.flip0.duplicateMovieClip(["flip"+a], a);
        }

```

So all that works fine, except when I add a onRelease event to a duplicated MovieClip it does not seem to respond. So I was wondering if the duplicateMovieClip function does not copy the button inside the original MovieClip.

The code for the button is

```auto

Master.flip0.card0.onRelease = function() {
    trace("The original");
}
Master.flip1.card0.onRelease = function() {
    trace("The duplicated one which wont work");
}

```

Anyone help out with this, thanks.
