can i make an on/off button for music in frontpage ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

have added music to web page but want ppl to be able to turn it off or on
again if thats what they want to do ...using front page 2003
 
1) Make sure the sound files are inserted using a Named Embed tag (usually just before the </body> tag)

<embed src="soundfile.mid" name="theNoise" id="theNoise" autostart="true" loop="true" width="0" height="0" hidden align="center">

2) Insert a link to turn the sound off

<a href="javascript:killNoise();">No Sound (or insert an image here)</a>

3) Insert this one of these scripts in the HEAD section of each page

FOR FRAMED PAGES USE:
<script language="JavaScript" language="JavaScript"><!-- Hide It:
function killNoise() {
// The Embedded sound is in a framed page (frame is named "TheFrame")
parent.TheFrame.embeds['theNoise'].stop(); return false;
}
// ShowIt: --></script>

FOR UNFRAMED PAGES USE:
<script language="JavaScript" language="JavaScript"><!-- Hide It:
function killNoise() {
// The Embedded sound is in an Unframed Page
document.theNoise.stop();return true;
}
// ShowIt: --></script>


--




| have added music to web page but want ppl to be able to turn it off or on
| again if thats what they want to do ...using front page 2003
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top