User Guide

Using device sound (Flash Professional only) 51
6. To play the sound with ActionScript, do the following:
a. Select the layer named Actions in the Timeline.
b. Open the Actions panel (Window > Actions), and type the following code:
var deviceSound:Sound = new Sound();
deviceSound.attachSound("device_sound");
deviceSound.start();
7.
Select Control > Test Movie to start the Flash Lite emulator and test your SWF file.
Creating a sound bundle (Flash Professional only)
Flash Lite 2.0 provides the ability to encapsulate several device sounds of different formats
into a single sound bundle. As an example, a single Flash application can contain the same
sound represented in both MIDI and MFi formats. When the application is played on a
device that supports MIDI audio, Flash Lite selects the MIDI sound data from the sound
bundle and passes it to the device to play. Similarly, if the application is played on a device
that supports only MFi, Flash Lite passes the MFi sound data to the device.
You use a utility called the Flash Lite Sound Bundler to create a sound bundle (FLS) file. You
then link the FLS file to a proxy sound in your Flash Lite document, just as you would do for
a single device sound. For more information about adding device sounds to your Flash Lite
applications, see “Using bundled device sound” on page 48.
To create a sound bundle file:
1. Open the Flash Lite Sound Bundler application (FlashLiteBundler.exe) located in the
Flash 8 installation folder (for example, boot drive/Program Files/Macromedia/Flash 8/
FlashLiteBundler.exe).
NOTE
As of this writing, the Sound Bundler utility is supported by Windows systems only.