Music On-Off button for Publisher

F

Frank At CCI

I have tried countless scripts but those I have found want code entered into
both the header and body and in Publisher you only have a code fragment to
enter. Adding header and body tags does not seem to work in the fragment. I
have to use the fragment because the web page changes frequently. I can
enable sound (through the background sound option in Publisher 2003) and only
need to disable it from the web page. Alternatively, if I could enable and
silence with the HTML code fragment, I could leave the link out of the
Publisher background sound. Has anyone found a way to turn sound on and off
in Publisher?

http://CCI.name
 
R

Rob Giordano \(Crash\)

The only way to turn bg sound off is with the red-X.
bg sound doesn't work in all browsers

Have you ever seen a profession website that had music?
Don't use background sound.

--

Rob Giordano
Microsoft MVP - FrontPage





|I have tried countless scripts but those I have found want code entered
into
| both the header and body and in Publisher you only have a code fragment to
| enter. Adding header and body tags does not seem to work in the fragment.
I
| have to use the fragment because the web page changes frequently. I can
| enable sound (through the background sound option in Publisher 2003) and
only
| need to disable it from the web page. Alternatively, if I could enable and
| silence with the HTML code fragment, I could leave the link out of the
| Publisher background sound. Has anyone found a way to turn sound on and
off
| in Publisher?
|
| http://CCI.name
|
|
 
D

DavidF

I have found various scripts that supposedly require adding script to the
head, actually work in Publisher even if the script isn't placed in the
head. Just try them.

But...think again about even having the musac. I agree with Rob. It does not
belong on your site IMHO....or most sites. Your content has nothing to do
with musac. It adds nothing...it slows the loading of the page, and it will
alienate the vast majority of people.

Just because you can do something doesn't mean you should. When you consider
adding fluff, whizz bang, special effects or anything to your site, ask
yourself if it helps the viewer find the content they are looking for, or
does it help communicate your message? Or is it just a distraction? K.I.S.S.

DavidF
 
F

Frank At CCI

I appreciate your thoughts but I like Pachelbel's Canon in D major c.1680
(alternates on the website with Beethoven's Fur Elise c.1810).

I have yet to find a script that will execute background music (on or off)
in Publisher. I have working HTML code fragments including one on that home
page. Based on Rob's comment no control exists to turn off background music
once turned on in publisher. How about if the code fragment turns it on and
off? The code I have found so far is either Flash or java script. They look
good like this one http://www.jdstiles.com/java/musiconoff.html but do not
seem to work in Publisher. Has anyone found a script that works in Publisher?

FrankC
 
D

DavidF

Hi FrankC,

The background music that is incorporated into Publisher is written into the
code, and it may be that you won't be able to override that code. So, take
that out, and try incorporating your music using the script that you found.

I inserted the two code snippets from your link and the script seems to work
ok, as it does toggle between off and on. I did not need to insert the first
snippet in the head section. In fact, I also found that I could copy and
paste the second code snippet...the "body" snippet below "head" snippet in
the same code fragment, and it would still work. I am not saying that is
what you should do...just that it works, and is an example of how some of
these free scripts that say you have to insert some of it in the head
section will work even if you insert them into the body....and in fact works
when they are combined into one code fragment.

To get it to actually play and turn off your music, modify this portion of
the script:

src="http://YOURDOMAIN/YOURSONGFILE.mid

Substitute in your domain address, upload your .mid file, and then write the
path to where you upload the file, and change the file name to match your
file name.

Personally I would suggest putting your song in its own folder on your site,
perhaps called "songs", and at the same level as the index.htm file and the
index_files folder. Then your link would look like this:

src="http://YOURDOMAIN/songs/YOURSONGFILE.mid

And of course show care in how you write the path, with no spaces and
matching upper and lower case. If you upload the song file to your site,
then when you do a web preview the song should play. If it doesn't, check
the path to the music file...you probably didn't write it correctly. It
worked when I tried it.

I like good music too...I just like to choose when I listen to it and not
have it forced on me.

DavidF
 

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

Top