User Guide

48 Working with Sound, Video, and Images
Using device sound (Flash Professional
only)
Device sounds refer to audio that is played directly by the device, rather than by the Flash Lite
player. Different devices may support different sound formats, including MIDI, MFi, or
MP3. To incorporate device sounds in your Flash Lite content you can either include them
within your published SWF file, or load external sound files over the network or from the
devices local file system. With some exceptions, you can use the ActionScript Sound object to
control device sounds, as you would control sounds in the desktop version of Flash Player.
This section contains the following topics:
“Using bundled device sound” on page 48
“Creating a sound bundle (Flash Professional only)” on page 51
“Playing external device sounds” on page 53
About synchronizing device sounds with animation” on page 54
“Determining supported device sound formats” on page 54
Using bundled device sound
To bundle a device sound in your application, you first import a proxy sound in a format that
the Flash authoring tool recognizes, such as an MP3, WAV, or AIFF file. Then you link the
proxy sound to a device sound file on your computer that you want to bundle in your
application. During the SWF file publishing process, the Flash authoring tool replaces the
proxy sound with the linked external sound. During playback, Flash Lite passes the sound
data to the device to decode and play.
You can also package multiple device sounds in different formats in a single Flash sound
bundle (FLS) file. This is useful if youre creating the same content for several devices that
support different device sound formats. For more information, see “Creating a sound bundle
(Flash Professional only)” on page 51.
This following procedure demonstrates how to import and play a bundled device sound. To
play a device sound you can either attach it to the Timeline or use the Sound object to play
the device sound with ActionScript. This section explains both techniques.