At this point of the development of your project, you'll use the temporary (proxy) sound files that I mentioned in the previous section. These proxy sound files are portable. To replace a standard sound file with one that is the optimal format for mobile playback, link the file to the MIDI file or a sound bundle file that you want to publish with your Flash application.
Use the Sound Properties dialog box (select a sound file in your library, right-click [PC] or Control-click [Mac], and choose Properties) and the Flash Publish Settings dialog box (choose File > Publish Settings and select the Flash tab) to link the proxy sound file to an external nonsupported sound file. When you publish your project, Flash replaces the proxy sound with the externally linked sound. The SWF file generated when you publish contains the sounds in the appropriate formats for playback on a mobile device.
When adding device-specific sounds or sound bundles to Flash documents for playback on mobile devices, keep the following in mind:
What's this event sound that I've been talking about? Event sound is the ability to play sound independent of the Timeline; and any event can be used to trigger an event sound. The event sound must download completely before it begins playing, and it continues playing until either the end of the sound buffer has been reached or the triggered sound is stopped. It is also helpful to note that you can loop event sounds within SWF files. This keeps your file size small while providing constant sound.
Place the sounds you processed inside a FLA file.
Double-click the soundTest movie clip on the Stage. Then double-click the mySounds movie clip in order to enter its symbol-editing mode and examine its timeline. Notice that there are temporary audio files under the first three labels. There's a WAV file under the fourth label and an MP3 file on the fifth label (see Figure 4).
Figure 4. The mySounds movie clip Timeline
Now return to the parent Timeline. Select the first button, open the Actions panel, and enter the following code:
on (press) {
tellTarget("mySounds") {
gotoAndPlay("sound1");
}
}
Select the second button and enter the following code:
on (press) {
tellTarget("mySounds") {
gotoAndPlay("sound2");
}
}
Select the third button and enter the following code:
on (press) {
tellTarget("mySounds") {
gotoAndPlay("sound3");
}
}
Select the fourth button and enter the following code:
on (press) {
tellTarget("mySounds") {
gotoAndPlay("sound4");
}
}
Select the fifth button and enter the following code:
on (press) {
tellTarget("mySounds") {
gotoAndPlay("sound5");
}
}
Now open your library so you can substitute MIDI sounds for the temporary MP3 files. Open your library, expand the sounds folder, and select tempAudio01.mp3. Bring up its properties, click the little folder icon to the right of Device Sound, and go to your sounds folder. Select piano_01.mld and click open. Notice that the sound file name now populates the device sound field (see Figure 5).
Figure 5. The Sound Properties dialog box of tempAudio01.mp3
Now you need to make sure that you have the proper publish settings. Select File > Publish Settings. On the Flash tab, select Flash Lite 1.1 from the Version drop-down list and then select the Export Device Sounds check box.
Figure 6. Verify the settings before publishing your Flash Lite 1.1 movie.
Publish your movie.
Congratulations—you're finished. Transfer your file to a Flash Lite 1.1–enabled phone to test your file.