With attach movie you can call a Movie Clip symbol from your library and tell it to go to the stage. If you are familiar with Director, this is similar to calling cast members from the cast library to the stage.
The benefit of using attach movie is that you can quickly swap out contents of a clip and replace it with new contents only if it is necessary (requested). This is similar to the benefits of Load Movie.
In order to do this, you need to set linkage for the symbols you want to call in the library. You set linkage either when making a new symbol in the advanced area or you can do it later through the top right turn down arrow of the Library panel (select Linkage with a symbol selected that you want to set the linkage for).
Attach movie takes a symbol from the library and attaches it to the SWF file on the Stage specified by my_mc. Use removeMovieClip() or unloadMovie() to remove a SWF file attached with attachMovie().
my_mc.attachMovie(idName, newName, depth)
Ex. on (release) {
clip.attachMovie("box", "box2", 2);
}
Parameters
idName The linkage name of the movie clip symbol in the library to attach to a movie clip on the Stage. This is the name entered in the Identifier field in the Linkage Properties dialog box.
newname A unique instance name for the movie clip being attached to the movie clip.
depth An integer specifying the depth level where the SWF file is placed.
download the attach movie sample file
(file name: attachmv.fla)
right click on the file (control-click for Mac) and select to download to your
drive.