FMX attachmovie

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 :slight_smile:

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:

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.

wow cool worked perfectly!!

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