Working with Movie Clips and Buttons > Using actions and methods to control movie clips > Duplicating and removing movie clips |
![]() ![]() ![]() |
Duplicating and removing movie clips
To duplicate or remove movie clip instances as a movie is playing, use duplicateMovieClip
or removeMovieClip
, respectively. The duplicateMovieClip
action and method dynamically create a new instance of the movie clip, assign it a new instance name, and give it a depth. A duplicated movie clip always starts at frame 1 even if the original movie clip was on another frame when duplicated, and is always on top of all previously defined movie clips placed on the Timeline.
To delete a movie clip you created with duplicateMovieClip
, use removeMovieClip
. Duplicated movie clips also are removed if the parent movie clip is deleted.
For more information, see duplicateMovieClip
and removeMovieClip
in the online ActionScript Dictionary in the Help menu.
![]() ![]() ![]() |