Loadsound (Sound.loadsound Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
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 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.
When using this method, consider the Flash Player security model.
For Flash Player 8:
Sound.loadSound()
sandbox and the sound is in a network sandbox.
Access from the local-trusted or local-with-networking sandbox requires permission from
website via a cross-domain policy file.
For Flash Player 7 and later:
Websites can permit access to a resource from requesters in different domains via a cross-
domain policy file.
For more information, see the following:
Chapter 17, "Understanding Security," in Learning ActionScript 2.0 in Flash
The Flash Player 8 Security white paper at http://www.macromedia.com/go/fp8_security
1108
ActionScript classes
is not allowed if the calling SWF file is in the local-with-file-system
,
loadSound (Sound.loadSound method)
isStreaming
parameter to indicate

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF