Removemovieclip (Movieclip.removemovieclip Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

See also
_quality property
removeMovieClip (MovieClip.removeMovieClip
method)
public removeMovieClip() : Void
Removes a movie clip instance created with
MovieClip.duplicateMovieClip()
MovieClip.attachMovie()
This method does not remove a movie clip assigned to a negative depth value. Movie clips
created in the authoring tool are assigned negative depth values by default. To remove a movie
clip that is assigned to a negative depth value, first use the
to move the movie clip to a positive depth value.
If you are using version 2 components, do not use this method. If you place a version 2
component either on the Stage or in the Library, the
sometimes return depth 1048676, which is outside the valid range. If you are using
version 2 components, you should always use version 2 components DepthManager
class.
If you are using version 2 components, and use
instead of the version 2 components DepthManager class to assign depth values, you
may find that
removeMovieClip()
the DepthManager class automatically reserves the highest (1048575) and lowest (-
16383) available depths for cursors and tooltips. A subsequent call to
getNextHighestDepth()
removeMovieClip()
range. If you must use
to assign a valid depth value or use
swapDepths()
contents of the movie clip. Alternatively, you can use the
depth values within the valid range.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Availability: ActionScript 1.0; Flash Player 5
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 {
duplicateMovieClip()
,
MovieClip.createEmptyMovieClip()
.
fails silently. When any version 2 component is used,
returns 1048576, which is outside the valid range. The
method fails silently if it encounters a depth value outside the valid
getNextHighestDepth()
,
MovieClip.swapDepths()
getNextHighestDepth()
MovieClip.getNextHighestDepth()
with version 2 components, you can use
MovieClip.unloadMovie()
DepthManager
, or
method
method can
to remove the
class to assign
MovieClip
917

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF