|
|
|
Controlling sound using Actionscript
Author: Saumitra Karandikar | Email
Advertisement
3. Adding audio to Button: There are two ways to do this. First one is to open the button for editing and add "audio" to frames of each state. Each state then has its own sound.
Fig 1.3 depicts the same.

Fig 1.3
Here we have added "music.mp3" from library to the third frame that is the "down" state. Hence, whenever the button is pressed and play head reaches this frame the audio plays. Note that if the button pressed multiple times, the audio also plays multiple times.
Another method to play audio, when a button is pressed, is by using actionscript. This is covered separately in another tutorial.
Download Source File
We hope the information helped you. If you have any questions
or comments, please don't hesitate to post them on the
Forums section
Submit your Tutorial at Click Here
|
|
|