# Duplicate Movie Clip

**URL:** <https://forum.kirupa.com/t/duplicate-movie-clip/273565>\
**Category:** Uncategorized\
**Created:** [October 17, 2008, 12:59am UTC](https://forum.kirupa.com/t/duplicate-movie-clip/273565 "2008-10-17T00:59:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kerepuki](https://avatars.discourse-cdn.com/v4/letter/k/df705f/32.png) [@kerepuki](https://forum.kirupa.com/u/kerepuki)\
**Post date:** [October 17, 2008, 12:59am UTC](https://forum.kirupa.com/t/duplicate-movie-clip/273565/1 "2008-10-17T00:59:50Z")

</div>

Hi,

Hopefully this is an easy one but I cant figure it out.

I have a movie clip that is being duplicated with \_droptarget code.

_root.mc\_scrolling\_elements.mc\_element\_shape\_0.duplicateMovieClip("mc\_element\_shape\_0_" + \_root.mc\_scrolling\_elements.i);  
\_root.mc\_scrolling\_elements.i ++;

i is set to 0 in the \_root of mc\_scrolling\_elements;

I then have a selectedElement variable in the \_root which stores the clicked elements instance name.

I want to set the selectedElement value to any newly created(duplicated) movie clip but I have no idea how I would pass (mc\_element\_shape\_0\_" + \_root.mc\_scrolling\_elements.i) to \_root.selectedElement.

Please help.
