Our Swish tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website.  Home Flash & Swish Swish Tutorials Add sound to a button

Add sound to a button


Example:

Click on the button above to see the example working.

Now open SwishMax and create your button , see fig.1 below.

image 1

Fig.1

If you wish to give your button separate over and down states do that now.

Now to add an action to your button click on the script tab, then click the Add Script button followed by Events

Now click Button followed by on (rollover) see fig.2 below.

image 2

Fig.2

You now have the on (rollover) button action associated with your button

Now for adding the the sound for the on (rollover) action to play

Click on Add Script this time Sound followed by playSound(...).

A new window will open up, just browse for the sound you wish to play,

And double click to assign the sound to the action see fig.3 below.

image 3

Fig.3

Repeat the process to add sound for the onPress function, you will see the sounds added to your contents list.

Add Sound to a Button

When you have finished adding the sounds for the different action press Ctrl + T to test it works.



Author's URL: Craig Lowe
Final results of our readers
New!
Passed through all the steps? Share your result!
Your result will be premoderated.
Please make sure you choose the right image.
 
 



Captcha

*Required fileds
Our Swish tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website. More Swish Tutorials: Featured Materials | Fresh Materials | More Swish Tutorials at FlashPerfection.com

Reader's comments
comments Mark October 10, 2010 says:
Thanks!
Reply
Add comments to "Add sound to a button"

Captcha