Home | Audio | DIY | Guitar | iPods | Music | Brain/Problem Solving | Links| Site Map
This work is licensed under a Creative Commons License.
Play sound, music on Rollover, on Click or on Page Load using Dreamweaver Behaviors!
Learn how to use Dreamweaver Behaviors to Play Sound in 2 quick steps:
The first step is to create a link for the sound to be played on Rollover or on Click. You can make a simple text link with the '#' symbol.
The next step is to add a behavior to the link. Open the Behaviors panel by clicking on Windows/Behaviors and click on the '+' symbol in the Behaviors Panel. Click on 'Play Sound'. Browse to find the sound you want to play and click on OK. If you want the music to play on some other event, go back to the behaviors panel and in the events drop down menu choose another event e.g. If you want the music to play on Rollover then you have to choose onMouseOver
Dreamweaver also generates the following code that embeds the sound file within the page:<embed name='CS1022563046202' src='sound.wav' loop=false autostart=false MASTERSOUND hidden=true width=0 height=0> </embed>
This can be included towards the end of the page.
HTML Code:<a href="#" onClick="MM_controlSound('play','document.CS1022563046202','sound.wav')">Click Here to Play Sound</a>
The above code is taken from Macromedia Dreamweaver 4.0. Make sure a sound file called 'sound.wav' is included in your local folder.
Home | Audio | DIY | Guitar | iPods | Music | Links | Site Map | Contact