Flash Player 3.
unloadMovie(target:MovieClip): VoidunloadMovie(target:String) : Void
target The target path of a movie clip.
None.
Function; removes a movie clip that was loaded by means of loadMovie() from Flash Player. To unload a movie clip that was loaded by means of loadMovieNum(), use unloadMovieNum() instead of unloadMovie().
The following example creates a new movie clip called pic_mc and loads an image into that clip. It is loaded using the MovieClipLoader class. When you click the image, the movie clip unloads from the SWF file:
var pic_mcl:MovieClipLoader = new MovieClipLoader();
pic_mcl.loadClip("http://www.macromedia.com/devnet/blueprint/articles/performance/spotlight_speterson.jpg", this.createEmptyMovieClip("pic_mc", this.getNextHighestDepth()));
var listenerObject:Object = new Object();
listenerObject.onLoadInit = function(target_mc) {
target_mc.onRelease = function() {
unloadMovie(pic_mc);
/* or you could use the following, which refers to the movie clip referenced by 'target_mc'. */
//unloadMovie(this);
};
};
pic_mcl.addListener(listenerObject);
MovieClip.loadMovie(), MovieClipLoader.unloadClip()
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/mx2004/main_7_2/00001868.html
Comments
Krxtopher said on Sep 20, 2004 at 10:24 AM :