Stop Function; Stopallsounds Function - MACROMEDIA FLASHLITE2 ACTIONSCRIPT-LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

See also
stopDrag function
(MovieClip.startDrag method)

stop function

stop() : Void
Stops the SWF file that is currently playing. The most common use of this action is to control
movie clips with buttons.
Availability: ActionScript 1.0; Flash Lite 1.0
See also
gotoAndStop function

stopAllSounds function

stopAllSounds() : Void
Stops all sounds currently playing in a SWF file without stopping the playhead. Sounds set to
stream will resume playing as the playhead moves over the frames in which they are located.
Availability: ActionScript 1.0; Flash Lite 1.0
Example
The following code creates a text field, in which the song's ID3 information appears. A new
Sound object instance is created, and your MP3 is loaded into the SWF file. ID3 information
is extracted from the sound file. When the user clicks
the user clicks
play_mc,
this.createTextField("songinfo_txt", this.getNextHighestDepth, 0, 0,
Stage.width, 22);
var bg_sound:Sound = new Sound();
bg_sound.loadSound("yourSong.mp3", true);
bg_sound.onID3 = function() {
songinfo_txt.text = "(" + this.id3.artist + ") " + this.id3.album + " - " +
this.id3.track + " - "
+ this.id3.songname;
for (prop in this.id3) {
trace(prop+" = "+this.id3[prop]);
}
trace("ID3 loaded.");
};
this.play_mc.onRelease = function() {
,
_droptarget (MovieClip._droptarget property)
,
gotoAndStop (MovieClip.gotoAndStop method)
the song resumes from its paused position.
the sound is paused. When
stop_mc,
Global Functions
,
startDrag
83

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash lite 2

Table of Contents