MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 693

Actionscript language reference
Table of Contents

Advertisement

Sound.loadSound()
Availability
Flash Player 6.
Usage
my_sound.loadSound(url:String, isStreaming:Boolean) : Void
Parameters
The location on a server of an MP3 sound file.
url
isStreaming
an event sound (
Returns
Nothing.
Description
Method; loads an MP3 file into a Sound object. You can use the
indicate whether the sound is an event or a streaming sound.
Event sounds are completely loaded before they play. They are managed by the ActionScript
Sound class and respond to all methods and properties of this class.
Streaming sounds play while they are downloading. Playback begins when sufficient data has been
received to start the decompressor.
All MP3s (event or streaming) loaded with this method are saved in the browser's file cache on the
user's system.
Example
The following example loads an event sound, which cannot play until it is fully loaded:
var my_sound:Sound = new Sound();
my_sound.loadSound("song1.mp3", false);
The following example loads a streaming sound:
var my_sound:Sound = new Sound();
my_sound.loadSound("song1.mp3", true);
See also
Sound.onLoad
A Boolean value that indicates whether the sound is a streaming sound (
).
false
parameter to
isStreaming
Sound.loadSound()
) or
true
693

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?

This manual is also suitable for:

Flex

Table of Contents