Get Our Free Ebook
Beginners Guide to HTML

  Tutorials Flash & Swish Swish Tutorials Add sound to a button

Add sound to a button


Click on the button above to see the example working.

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

image 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


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


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.

subscribe to newsletter