Post a URL to the page online
The Embed does not go in the HEAD section,
- it goes inside the <BODY> tags before the </body> tag
Only the Correct script from my post (depending on whether you use fames or not) goes in the HEAD section
PS
Remove all spaces from file names
- rename your sound file as
Let_Your_Love_Flow.mp3
--
|I went ahead and tried it as you stated...This is how it looks
| <embed src="Let%20Your%20Love%20Flow.mp3" name="theNoise" id="theNoise"
| autostart="true" loop="true" width="0" height="0" hidden align="center">
| <a href="javascript:killNoise();">No Sound </a>
| </head>
| <script language="JavaScript" language="javascript"><!--Hide It: function
| killnoise() {script>
| //The Embedded sound is in a framed page (frame is named "TheFrame")
| parent.TheFrame.embeds['thenoise'].stop(); return false;
| }
| // ShowIt: --></script>
|
| However, when I preview it I get a script error message that states line 25
| char 44..."return" statement outside of function...referring to }
|
| I was amazed to see that when I go to preview that my No Sound link is
| there, but when I click on it...I also get another script error message
| saying Line 1 Char 1...
| object expected. This is how my Line 1 reads
|
| <html xmlns:v="urn:schemas-microsoft-com:vml"
| xmlns
="urn:schemas-microsoft-com
ffice
ffice"
| xmlns="
http://www.w3.org/TR/REC-html40">
|
| There is no sound, and each time I return my embed src line is highlighted.
| All that I have did is enter the code as you explained...but when you talk
| about using
| a Named Embed tag...again Im lost. My sound was entered through the page
| properties. Am I missing something. Steven
|
|
|
| "Stefan B Rusynko" wrote:
|
| > 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>
| >
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| >
http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > |I have been adding music to my web pages, but I would like it so the visitor
| > | can toggle the sound on or off. I cannot find a way to do this. Someone
| > | help me please. Steven
| >
| >
| >