Duplicatemovieclip (Movieclip.duplicatemovieclip Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

} else {
this._x = origX;
this._y = origY;
}
};
See also
startDrag (MovieClip.startDrag method)
,
method)
eval function
duplicateMovieClip (MovieClip.duplicateMovieClip
method)
public duplicateMovieClip(name:String, depth:Number, [initObject:Object]) :
MovieClip
Creates an instance of the specified movie clip while the SWF file is playing. Duplicated
movie clips always start playing at Frame 1, no matter what frame the original movie clip is on
when the
duplicateMovieClip()
copied into the duplicate movie clip. Movie clips that are created with the
duplicateMovieClip()
method on their parent. If the parent movie clip is deleted, the duplicate movie clip is also
deleted. If you used
MovieClip.loadMovie()
clip, the contents of the SWF file are not duplicated. This means that you cannot save
bandwidth by loading a JPEG, GIF, PNG, or SWF file and then duplicating the movie clip.
Contrast this method with the global function version of
global version of this method requires a parameter that specifies the target movie clip to
duplicate. Such a parameter is unnecessary for the MovieClip class version, because the target
of the method is the movie clip instance on which the method is invoked. Moreover, the
global version of
duplicateMovieClip()
the return value of a reference to the newly created MovieClip instance.
Availability: ActionScript 1.0; Flash Player 5
Parameters
- A unique identifier for the duplicate movie clip.
name:String
- A unique integer specifying the depth at which the new movie clip is placed.
depth:Number
Use depth -16384 to place the new movie clip instance beneath all content that is created in
the authoring environment. Values between -16383 and -1, inclusive, are reserved for use by
the authoring environment and should not be used with this method. The remaining valid
depth values range from 0 to 1048575, inclusive.
method is called. Variables in the parent movie clip are not
method are not duplicated if you call the
supports neither the
,
stopDrag (MovieClip.stopDrag
duplicateMovieClip()
or the MovieClipLoader class to load a movie
duplicateMovieClip()
initobject
. The
parameter nor
MovieClip
855

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF