Don't use the background sound tag instead
1) You should be using the Embed tag (not the bgsound tag) for the sound
(for cross browser compatibility) - first apply a name to your sound (say
"noSound")
<embed src="../sounds/alhambra.mid" name="noSound" autostart="true"
volume="50" loop="true" width="0" height="0" align="center" hidden>
2) Then Insert a "no sound" image on the page and then add an onclick event:
<img border="0" src="../images/bt_noplay.gif"
onclick="document.noSound.stop();return true;" alt="Stop Music"
align="absmiddle" width="20" height="20">
3) Or if you are using frames in the head section of one frame add:
<script type="text/javascript" language="JavaScript"><!-- Hide It:
// Where "pgmain" below is the name of the frame containing the embed tag
function killSound() { parent.pgmain.embeds['noSound'].stop(); }
// Show It: --></script>
Then in the body of the same frame add a link:
<a href="javascript:killSound()"><img border="1"
src="../images/bt_noplay.gif" align="absmiddle" alt="Stop Music" hspace="3"
width="20" height="20"></a>
Or for Text:
<a href="javascript:killSound()">No Sound</a>
| Is there a way in FP 2002/2003 to have background sound
| on a page that can be turned off or on by the viewer of
| the page? If it can be done, any suggestions on HTML to
| make it happen?
|
| Thanks in advance
|
| Dick