Adding a device sound to a button
The following procedure describes how to add a device sound to a button symbol's timeline so that the sound plays then user "clicks" the button (that is, when the user presses the selects on their device when the button has focus). To do this, you attach the proxy sound to the Down frame in a button symbol's timeline. You then associate the device sound that you want to play with the proxy sound.
A completed version of the application named button_sound_complete.fla is located at http://www.adobe.com/go/learn_flt_samples_and_tutorials. On the Samples and Tutorials page, locate, download and decompress the .zip file for your Flash Lite version, and then navigate to the Samples folder to access the sample.
To add a device sound to a Flash document:
- Create a new document from the Flash Lite 1.0 Symbian Series 60 document template, and save it as device_sound.fla.
For more information about using the Flash Lite document templates, see Using Flash Lite document templates in Getting Started with Flash Lite 1.x.
- Select File > Import > Import to Library. On the Samples and Tutorials page at http://www.adobe.com/go/learn_flt_samples_and_tutorials, locate, download and decompress the .zip file for your Flash Lite version, and then navigate to the Samples folder. Select the proxy.wav file and click OK.
This sound file acts as the proxy sound for the device sound that you want to include.
- Select Window > Common Libraries > Buttons.
This opens an external library that contains prebuilt button symbols.
- In the Buttons library, double-click the Circle Buttons folder to open it.
- In the Timeline, select the layer named Content in the Timeline.
- Drag the button symbol named Play from the buttons library to the Stage.
- Double-click the new button to open it edit mode.
The Timeline changes to show the button's frames named Up, Over, Down, and Hit.
- Select Insert > Timeline > Layer to create a new layer.
- Select Modify > Timeline > Layer Properties, and change the name of the layer to Sound.
- Select the Down frame in the Sound layer and press the F6 function key to insert a new keyframe.
- With the new keyframe selected in the Timeline, in the Property inspector, select proxy.wav from the Sound pop-up menu.
This attaches the proxy sound to the keyframe.
- To link the proxy sound with the actual device sound file, do the following:
- In the Library, double-click the proxy.wav symbol to open the Sound Properties dialog box.
- In the Sound Properties dialog box, click the folder icon to the right of the Device sound text box to open the Select Device Sound dialog box.
- Browse to http://www.adobe.com/go/learn_flt_samples_and_tutorials. On the Samples and Tutorials page, locate, download and decompress the .zip file for your Flash Lite version, and then navigate to the Samples folder and select the file named hi_hat.mid.
- Click OK.
- Select Control > Test Movie to start the Adobe Device Central emulator and test your SWF file.
In the emulator, press the Down Arrow key on the keypad to give the Play button focus, and then press the Select key to play the sound.
Flash CS3