MovieClip class
Availability
Flash Player 3.
Description
The methods for the MovieClip class provide the same functionality as actions that target movie
clips. There are also additional methods that do not have equivalent actions in the Actions
toolbox in the Actions panel.
You do not need to use a constructor method to call the methods of the MovieClip class; instead,
you reference movie clip instances by name, using the following syntax:
my_mc.play();
my_mc.gotoAndPlay(3);
You can extend the methods and event handlers of the MovieClip class by creating a subclass. For
more information, see "Assigning a class to a movie clip symbol" in Using ActionScript in Flash.
Method summary for the MovieClip class
Method
MovieClip.attachAudio()
MovieClip.attachMovie()
MovieClip.createEmptyMovieClip()
MovieClip.createTextField()
MovieClip.duplicateMovieClip()
MovieClip.getBounds()
MovieClip.getBytesLoaded()
MovieClip.getBytesTotal()
MovieClip.getDepth()
MovieClip.getInstanceAtDepth()
MovieClip.getNextHighestDepth()
MovieClip.getSWFVersion()
MovieClip.getTextSnapshot()
MovieClip.getURL()
ActionScript Language Reference
Description
Captures and plays local audio from the microphone hardware.
Attaches a SWF file or movie clip in the library.
Creates an empty movie clip.
Creates an empty text field.
Duplicates the specified movie clip.
Returns the minimum and maximum x and y coordinates of a
SWF file in a specified coordinate space.
Returns the number of bytes loaded for the specified
movie clip.
Returns the size of the movie clip, in bytes.
Returns the depth of a movie clip.
Returns the movie clip instance from a particular depth if it
exists.
Returns the next available depth that can be passed to other
methods. This ensures that Flash renders the movie clip in
front of all other objects in the current movie clip.
Returns an integer that indicates the Flash Player version for
which the movie clip was published.
Returns a TextSnapshot object that contains the text in the
static text fields in the specified movie clip.
Retrieves a document from a URL.
CHAPTER 2
MovieClip class
489
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?