# FMX attachmovie

**URL:** <https://forum.kirupa.com/t/fmx-attachmovie/10308>\
**Category:** flash\
**Created:** [December 29, 2002, 5:09am UTC](https://forum.kirupa.com/t/fmx-attachmovie/10308 "2002-12-29T05:09:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![blah\_de\_blah](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@blah\_de\_blah](https://forum.kirupa.com/u/blah_de_blah)\
**Post date:** [December 29, 2002, 5:09am UTC](https://forum.kirupa.com/t/fmx-attachmovie/10308/1 "2002-12-29T05:09:16Z")

</div>

ok basically what i want to do is to duplicate a movieclip into the root, but the movieclip i want to duplicate, isn’t in the root, instead it is in another movieclip.  
get it? i hope thats clear…

so i heard that the duplicateMovieClip function only works if both movieclips are in ‘this’, and so i’m guessing i use the attachmovie function. But it doesn’t seem to work, not sure why…can someone plz tell me how to use this function the way i want it to? i’ve looked at the flash help thing but its not exactly what i want…

thx i hope you understood my question 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2002, 10:11pm UTC](https://forum.kirupa.com/t/fmx-attachmovie/10308/2 "2002-12-29T22:11:27Z")

</div>

If the symbol already has an instance inside another movieclip that is on the stage at run time then you can do the following:  
[list]Open your library  
Right-click on your symbol in the library  
Select Linkage…  
Select Export for ActionScript  
Deselect Export in first frame  
Give your symbol a Linkage Identifier  
Click OK[/list]  
Now go back to your timeline and use the following code to attach an instance:

```auto
this.attachMovie(*identifier*, *newName*, *depth*);

```

_identifier_ and _newName_ are both strings, meaning they should be in quotes, and _depth_ is a number. That should do the trick.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 30, 2002, 2:45am UTC](https://forum.kirupa.com/t/fmx-attachmovie/10308/3 "2002-12-30T02:45:37Z")

</div>

wow cool worked perfectly!!

never knew there was a linkage or whatever thing but thx!
