Loadsound (Sound.loadsound Method) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following example traces the ID3 properties of song.mp3 to the Output panel:
var my_sound:Sound = new Sound();
my_sound.onID3 = function(){
for( var prop in my_sound.id3 ){
trace( prop + " : "+ my_sound.id3[prop] );
}
}
my_sound.loadSound("song.mp3", false);
See also
attachSound (Sound.attachSound method)

loadSound (Sound.loadSound method)

public loadSound(url:String, isStreaming:Boolean) : Void
Loads an MP3 file into a Sound object. You can use the
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 is
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.
Note: For Flash Lite 2.0, you can ignore the
treats every sound as an event sound.
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
- The location on a server of an MP3 sound file.
url:String
isStreaming:Boolean
sound (
) or an event sound (
true
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);
isStreaming
- A Boolean value that indicates whether the sound is a streaming
).
false
,
loadSound (Sound.loadSound method)
isStreaming
parameter because Flash Lite 2.0
parameter to indicate
Sound
609

Advertisement

Table of Contents
loading

Table of Contents