03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

See also<br />

stop (Sound.stop method)<br />

stop (Sound.stop method)<br />

public stop([linkageID:String]) : Void<br />

Stops all sounds currently playing if no parameter is specified, or just the sound specified in<br />

the idName parameter.<br />

Parameters<br />

linkageID:String [optional] - A parameter specifying a specific sound to stop playing. The<br />

idName parameter must be enclosed in quotation marks (" ").<br />

Example<br />

The following example uses two buttons, stop_btn <strong>and</strong> play_btn, to control the playback of<br />

a sound that loads into a SWF file. Add two buttons to your document <strong>and</strong> add the following<br />

ActionScript to your FLA or AS file:<br />

var my_sound:Sound = new Sound();<br />

my_sound.loadSound("song1.mp3", true);<br />

stop_btn.onRelease = function() {<br />

trace("sound stopped");<br />

my_sound.stop();<br />

};<br />

play_btn.onRelease = function() {<br />

trace("sound started");<br />

my_sound.start();<br />

};<br />

See also<br />

start (Sound.start method)<br />

Stage<br />

Object<br />

|<br />

+-Stage<br />

public class Stage<br />

extends Object<br />

584 ActionScript classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!