Flash Templates Tutorials - Creating and removing of the clip instances
2. Creating and removing of the clip instances
You can create the clips using the clips in the library, duplicate them, remove and create new clips with them. The easiest way is to duplicate the existing clips from the scene along with their graphics, animation, variables and scripts. To do so, use duplicateMovieClip action. It is used in the following format:
duplicateMovieClip(path to the clip,"name of the new clip", level);
The first parameter sets the path to initial clip that you want to duplicate. The second parameter sets the name for the new clip sample, it must be of the line type and be unique. The last, third parameter sets the level of the new clip related to the initial one.
To remove the copy of the clip that you do not need, use removeMovieClip command.
removeMovieClip (path to the clip);