Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript language elements > Global Functions > removeMovieClip function | |||
removeMovieClip(target:Object)
Deletes the specified movie clip.
Availability: ActionScript 1.0; Flash Player 4
target:Object - The target path of a movie clip instance created with duplicateMovieClip() or the instance name of a movie clip created with MovieClip.attachMovie(), MovieClip.duplicateMovieClip(), or MovieClip.createEmptyMovieClip().
The following example creates a new movie clip called myClip_mc and duplicates the movie clip. The second movie clip is called newClip_mc. Images are loaded into both movie clips. When a button, button_mc, is clicked, the duplicated movie clip is removed from the Stage.
this.createEmptyMovieClip("myClip_mc", this.getNextHighestDepth());
myClip_mc.loadMovie("http://www.helpexamples.com/flash/images/image1.jpg");
duplicateMovieClip(this.myClip_mc, "newClip_mc", this.getNextHighestDepth());
newClip_mc.loadMovie("http://www.helpexamples.com/flash/images/image1.jpg");
newClip_mc._x = 200;
this.button_mc.onRelease = function() {
removeMovieClip(this._parent.newClip_mc);
};
duplicateMovieClip function, duplicateMovieClip (MovieClip.duplicateMovieClip method), attachMovie (MovieClip.attachMovie method), removeMovieClip (MovieClip.removeMovieClip method), createEmptyMovieClip (MovieClip.createEmptyMovieClip method)
Version 8
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00001765.html
Comments
neil8010 said on Dec 24, 2006 at 9:18 AM : Snottlebocket said on Mar 5, 2007 at 11:38 PM : scibert said on Jun 11, 2007 at 10:39 PM :