woofie's toolbox - audio
To control when audio plays and stops, embed the audio as below and using the following calls to play it. Put the following tag in the section. Name the sound using the
name
attribute and call it
<EMBED SRC="../../sounds/applause.MP2" HIDDEN=TRUE CONTROLS=console VOLUME=100 LOOP=FALSE AUTOSTART=FALSE NAME="boink">
And put the function in and call it
<SCRIPT LANGUAGE=JavaScript> function PlaySound(sound) { if (sound == null) { return; } else { sound.play(false); } } PlaySound(document.boink); </SCRIPT>
To play a sound when the page is done loading, add the onLoad attribute to the <BODY> tag as follows.
onLoad=PlaySound(document.boink);
You can add a sound to link by adding the onClick attribute to the <a href> tag.
Game show chime
View source of this document to see how the game show chime is controlled, both when the page is loaded and when you click the link above.