unloadMovie (MovieClip.unloadMovie method)

public unloadMovie() : Void

Removes the contents of a movie clip instance. The instance properties and clip handlers remain.

To remove the instance, including its properties and clip handlers, use MovieClip.removeMovieClip().

You can extend the methods and event handlers of the MovieClip class by creating a subclass.

Example

The following example unloads a movie clip instance called box when a user clicks the box movie clip:

this.createEmptyMovieClip("box", 1);

with (box) {
    lineStyle(1, 0xCCCCCC);
    beginFill(0x4827CF);
    moveTo(0, 0);
    lineTo(80, 0);
    lineTo(80, 60);
    lineTo(0, 60);
    lineTo(0, 0);
    endFill();
}

box.onRelease = function() {
        box.unloadMovie();
};

See also

removeMovieClip (MovieClip.removeMovieClip method), attachMovie (MovieClip.attachMovie method), loadMovie (MovieClip.loadMovie method), unloadMovie function, unloadMovieNum function


Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00005354.html