Unlike Flash Light 2.x and 3.0, Flash Lite 3.1 supports streaming sound playback. Accordingly, Flash Lite 3.1 handles the parameters of the loadSound() method differently than Flash Lite 2.x and 3.0. This difference in behavior concerns the second parameter of loadSound(), isStreaming. When this parameter is set to true, Flash Lite 3.1 behaves differently from previous versions.
- The second parameter, isStreaming, is ignored.
- The loaded sound file is always treated as a device sound.
The behavior differs, depending on the value of the isStreaming parameter:
- If isStreaming is set to true, the loaded file is treated as a streaming sound. For streaming sounds, playback starts automatically once the sound data is partially loaded; Sound.start() isn't called.
- If isStreaming set to false, the loaded sound file is treated as a device sound.
- When playing back a device sound, the following code plays the sound correctly in Flash Lite 2.x and 3.0, since the second parameter is ignored:
- var my_sound:Sound = new Sound();
- my_sound.loadSound("song1.midi", true);
- var my_sound:Sound = new Sound();
- In Flash Light 3.1 and later, the previous example fails for device sounds. When playing device sounds in FL3.1 and later, set the isStreaming parameter to false, as follows:
- var my_sound:Sound = new Sound();
- my_sound.loadSound("song1.midi", false);
Keywords:
cpsid_53987

