M > MovieClip.duplicateMovieClip |  |

MovieClip.duplicateMovieClip

movieclip, movieclip.duplicatemovieclip, duplicatemovieclip

Availability

Flash Player 5.

Usage

    myMovieClip.duplicateMovieClip(newname, depth [,initObject])

Parameters

`newname` A unique identifier for the duplicate movie clip.

`depth` A unique number specifying the depth at which the movie specified is to be placed.

`initObject` An object containing properties with which to populate the duplicated movie clip. This parameter allows dynamically created movie clips to receive clip parameters. If `initObject` is not an object, it is ignored. All properties of `initObject` are copied into the new instance. The properties specified with `initObject` are available to the constructor function. This parameter is optional.

Returns

Nothing.

Description

Method; creates an instance of the specified movie clip while the movie is playing. Duplicated movie clips always start playing at Frame 1, no matter what frame the original movie clip is on when the `duplicateMovieClip` method is called. Variables in the parent movie clip are not copied into the duplicate movie clip. Movie clips that have been created using the `duplicateMovieClip` method are not duplicated if you call the `duplicateMovieMethod` on their parent. If the parent movie clip is deleted, the duplicate movie clip is also deleted. Movie clips added with `duplicateMovieClip` can be deleted with the `removeMovieClip` action or method.

See also

`duplicateMovieClip`, `MovieClip.removeMovieClip`, `removeMovieClip`