<class home>  <Jscript>   <back   next>

Playing Sound

You can use this action to play a sound when the user mouses over or clicks on something, for example. This is great for image links, they can have rollover sounds, just be sure to use small sound files: around 10K.

example>>>


How do I get sound into my page with Javascript?

1. In the behaviors panel, select a browser version 3 and above.

2. In the document window, select the object you want add the behavior to. If it is the whole page, select the whole body tag, opening to closing, or click on the work <body> in the bottom of the document window.

*note: If you are using a link that doesn't need to go anywhere, put in a "#" symbol in the URL box, or the word "Javascript:;"
ex.


3. In the Behaviors Panel select the Play Sound action.

4. In the dialog box that follows, enter in a URL for the sound. Click o.k.

5. In the Behaviors Panel select an event from the pull down (ex. onLoad, onClick, onMouseOver,etc.).