How Do I Add Sound Effects In Dreamweaver CS3?

Question by Chrissy: How Do I Add Sound Effects In Dreamweaver CS3?
How do I add sound effects to roll overs, mouse clicks, and when a new page is loading using Dreamweaver CS3?

Best answer:

Answer by socratesone
DreamWeaver doesn’t include this functionality natively. You have to do it yourself.

Here’s how you do it:

1) First, make sure you have the sound file and put it where your page can access it.
2) Enter in an HTML tag that allows for the sound to be played. This is usually an tag. You can also add a flash file that plays a sound. In DreamWeaver, this is Insert > Media > Plugin.
More info about embed:

http://www.webreference.com/js/column20/embed.html

3) Create a javascript function that plays the file.
More info:

http://www.boutell.com/newfaq/creating/scriptsound.html

4) Add the events to the HTML element.
More info:

http://www.dwfaq.com/Tutorials/DW-Interface/behavior_events.asp

There are a couple code snippets and libraries out there that will make this easier, but there will be a little reading and experimentation involved. I needed something similar before, and I found this:

http://www.schillmania.com/projects/soundmanager2/

Which works great.

Hope that helps.

Add your own answer in the comments!

You can leave a response, or trackback from your own site.

Leave a Reply