MovieClip.removeMovieClip()
Availability
Flash Player 5.
Usage
my_mc.removeMovieClip() : Void
Parameters
None.
Returns
Nothing.
Description
Method; removes a movie clip instance created with
MovieClip.duplicateMovieClip(),
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Example
Each time you click a button in the following example, you attach a movie clip instance to the
Stage in a random position. When you click a movie clip instance, you remove that instance from
the SWF file.
function randRange(min:Number, max:Number):Number {
var randNum:Number = Math.round(Math.random()*(max-min))+min;
return randNum;
}
var bugNum:Number = 0;
addBug_btn.onRelease = addBug;
function addBug() {
var thisBug:MovieClip = this._parent.attachMovie("bug_id",
"bug"+bugNum+"_mc", bugNum, {_x:randRange(50, 500), _y:randRange(50, 350)});
thisBug.onRelease = function() {
this.removeMovieClip();
};
bugNum++;
}
MovieClip._rotation
Availability
Flash Player 4.
Usage
my_mc._rotation:Number
614
Chapter 7: ActionScript for Flash
duplicateMovieClip()
or
MovieClip.attachMovie()
,
.
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?