Stop (Sound.stop Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

The
MovieClip.getNextHighestDepth()
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
See also

stop (Sound.stop method)

stop (Sound.stop method)
public stop([linkageID:String]) : Void
Stops all sounds currently playing if no parameter is specified, or just the sound specified in
the
parameter.
idName
Availability: ActionScript 1.0; Flash Player 5
Parameters
[optional] - A parameter specifying a specific sound to stop playing. The
linkageID:String
parameter must be enclosed in quotation marks (" ").
idName
Example
The following example uses two buttons,
a sound that loads into a SWF file. Add two buttons to your document and add the following
ActionScript to your FLA or AS file:
var my_sound:Sound = new Sound();
my_sound.loadSound("song1.mp3", true);
stop_btn.onRelease = function() {
trace("sound stopped");
my_sound.stop();
};
play_btn.onRelease = function() {
trace("sound started");
my_sound.start();
};
See also
start (Sound.start method)
method used in this example requires Flash Player
MovieClip.getNextHighestDepth()
and
stop_btn
method.
, to control the playback of
play_btn
Sound
1117

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