MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 702

Actionscript language reference
Table of Contents

Advertisement

Example
The following example uses two buttons,
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
Sound.start()
702
Chapter 7: ActionScript for Flash
and
stop_btn
play_btn
, to control the playback of a

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flex

Table of Contents