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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Loads an MP3 file into a Sound object. You can use the isStreaming parameter to indicate<br />

whether the sound is an event or a streaming sound.<br />

Event sounds are completely loaded before they play. They are managed by the ActionScript<br />

Sound class <strong>and</strong> respond to all methods <strong>and</strong> properties of this class.<br />

Streaming sounds play while they are downloading. Playback begins when sufficient data is<br />

received to start the decompressor.<br />

All MP3s (event or streaming) loaded with this method are saved in the browser's file cache<br />

on the user's system.<br />

Note: For Flash Lite 2.0, you can ignore the isStreaming parameter because Flash Lite 2.0<br />

treats every sound as an event sound.<br />

Parameters<br />

url:String - The location on a server of an MP3 sound file.<br />

isStreaming:Boolean - A Boolean value that indicates whether the sound is a streaming<br />

sound (true) or an event sound (false).<br />

Example<br />

The following example loads an event sound, which cannot play until it is fully loaded:<br />

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

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

The following example loads a streaming sound:<br />

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

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

See also<br />

onLoad (Sound.onLoad h<strong>and</strong>ler)<br />

onID3 (Sound.onID3 h<strong>and</strong>ler)<br />

onID3 = function() {}<br />

Invoked each time new ID3 data is available for an MP3 file that you load using<br />

Sound.attachSound() or Sound.loadSound(). This h<strong>and</strong>ler provides access to ID3 data<br />

without polling. If both ID3 1.0 <strong>and</strong> ID3 2.0 tags are present in a file, this h<strong>and</strong>ler is called<br />

twice.<br />

576 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!