# duplicateMovieClip embed target?

**URL:** https://forum.kirupa.com/t/duplicatemovieclip-embed-target/331384
**Category:** flash
**Created:** [July 20, 2013, 5:53pm UTC](https://forum.kirupa.com/t/duplicatemovieclip-embed-target/331384 "2013-07-20T17:53:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![PicoToc](https://avatars.discourse-cdn.com/v4/letter/p/bc79bd/32.png) [@PicoToc](https://forum.kirupa.com/u/PicoToc)
#### Post date: [July 20, 2013, 5:53pm UTC](https://forum.kirupa.com/t/duplicatemovieclip-embed-target/331384/1 "2013-07-20T17:53:23Z")

</div>

Hi all,

I am trying to figure out how to use duplicateMovieClip to copy an embedded object between two other objects on the stage. For example:

Stage contains the following:  
movieClip1  
movieClip2

MovieClip1 contains the following:  
movieClip3

On the triggering event, I want it to switch from movieClip1.movieClip3 to movieClip2.movieClip3… and can’t figure out how. I can do it fine with attachMovie, because I can just remove the instance from movieClip1 and re-attach it in movieClip2 (ie - movieClip2.attachMovie(movieClip3, “blarg”,movieClip2.getNextHighestDepth)

However, this “resets” the variables associated with the clip to the default in the library, whereas I want a duplicate of the current stage object - I want movieClip3 to maintain any changes since its initial load from the library.

The problem seems to be that the place for the location in attachMovie (everything before it (\_root.movieClip2.attachMovie) doesn’t work because for duplicateMovie that placement defines what clip is DUPLICATED not the LOCATION of it. Ex: movieClip2.duplicateMovieClip() will duplicate movieClip2, not a clip INTO movieClip2. Hope that makes sense, I am not sure how else to describe it.

In essense: how can I move an embedded clip between two containers and maintain its integrity instead of reloaded the default from the library?
