MovieClip.play()

Availability

Flash Player 5.

Usage

my_mc.play() : Void

Parameters

None.

Returns

Nothing.

Description

Method; moves the playhead in the Timeline of the movie clip.

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.

Example

Use the following ActionScript to play the main Timeline of a SWF file. This ActionScript is for a movie clip button called my_mc on the main Timeline:

stop();
my_mc.onRelease = function() {
   this._parent.play();
};

Use the following ActionScript to play the Timeline of a movie clip in a SWF file. This ActionScript is for a button called my_btn on the main Timeline that plays a movie clip called animation_mc:

animation_mc.stop();
my_btn.onRelease = function(){
   animation_mc.play();
};

See also

play(), MovieClip.gotoAndPlay(), gotoAndPlay()

 

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/00001546.html