03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

} else {<br />

this._x = origX;<br />

this._y = origY;<br />

}<br />

};<br />

See also<br />

startDrag (MovieClip.startDrag method), stopDrag (MovieClip.stopDrag<br />

method), eval function<br />

duplicateMovieClip (MovieClip.duplicateMovieClip<br />

method)<br />

public duplicateMovieClip(name:String, depth:Number, [initObject:Object]) :<br />

MovieClip<br />

Creates an instance of the specified movie clip while the SWF file is playing. Duplicated<br />

movie clips always start playing at Frame 1, no matter what frame the original movie clip is on<br />

when the duplicateMovieClip() method is called. Variables in the parent movie clip are not<br />

copied into the duplicate movie clip. Movie clips that are created with the<br />

duplicateMovieClip() method are not duplicated if you call the duplicateMovieClip()<br />

method on their parent. If the parent movie clip is deleted, the duplicate movie clip is also<br />

deleted. If you used MovieClip.loadMovie() or the MovieClipLoader class to load a movie<br />

clip, the contents of the SWF file are not duplicated. This means that you cannot save<br />

b<strong>and</strong>width by loading a JPEG, GIF, PNG, or SWF file <strong>and</strong> then duplicating the movie clip.<br />

Contrast this method with the global function version of duplicateMovieClip(). The<br />

global version of this method requires a parameter that specifies the target movie clip to<br />

duplicate. Such a parameter is unnecessary for the MovieClip class version, because the target<br />

of the method is the movie clip instance on which the method is invoked. Moreover, the<br />

global version of duplicateMovieClip() supports neither the initobject parameter nor<br />

the return value of a reference to the newly created MovieClip instance.<br />

Parameters<br />

name:String - A unique identifier for the duplicate movie clip.<br />

depth:Number - A unique integer specifying the depth at which the new movie clip is placed.<br />

Use depth -16384 to place the new movie clip instance beneath all content created in the<br />

authoring environment. Values between -16383 <strong>and</strong> -1, inclusive, are reserved for use by the<br />

authoring environment <strong>and</strong> should not be used with this method. The remaining valid depth<br />

values range from 0 to 1048575, inclusive.<br />

420 ActionScript classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!