View Full Version : Music on website
RickJ
Feb 20, 2006, 01:47 PM
Daughter's homework assignment:
www.jackson8.com/sarah/cowboy
She's using
<bgsound src="mysong.mid" loop="1">
for the music (on each page) but it's reloading on every page. We'd like it to load, and play, when going to the site... then continue playing no matter what link is navigated to.
How do we do that?
Thanks!
Rick.
.
LTheobald
Feb 21, 2006, 02:29 AM
Easiest way - use frames. Have two horizontal frames. One for the title, the links and the sound file, one for the contents of the page shown when you click on the links.
That way, when you click on a link, it just reloads the lower frame, keeping the sound running. Here's W3Schools page on frames (http://www.w3schools.com/html/html_frames.asp). Give me a shout if you need some help Rick :)
RickJ
Feb 21, 2006, 03:29 AM
Thanks, LT.
If it were my project, I'd ask you for more detail, but since it's my daughter's homework, I'll have to point her to the Dreamweaver Manual. I've never done frames - as the user side of me just doesn't like them.
Thanks for pointing us in the right direction!
LTheobald
Feb 21, 2006, 04:28 AM
I'm not a fan of frames either. There's better ways of doing things.
Those tend to me complicated though so I thought frames would be the way to go.
RickJ
Feb 21, 2006, 04:36 AM
Actually, I'm now thinking of a "shortcut" since it's just a homework assignment:
I'm thinking to remove the
<bgsound src="mysong.mid" loop="1">
from all pages but the home page, then have the links from the homepage open in a new window... so that the homepage stays open in the background.
I'm playing with it right now...
RickJ
Feb 21, 2006, 04:44 AM
Ok, done. I definitely like it better this way - in IE: www.jackson8.com/sarah/cowboy
... but I see now that it does not work in FF. I'm pretty sure they're using IE at her school... but shouldn't that code work in FF too?
ScottGem
Feb 21, 2006, 07:45 AM
Just my 2 cents but I do not like pages that play sounds without my permission. I will, generally, immediately click off them. People access pages from work, late at night etc. Having unwanted or unexpected sounds blaring from your speakers at inopportune moments can cause problems.
RickJ
Feb 21, 2006, 07:49 AM
Actually, me too. If music assaults me, I either run away or run for the off button.
This is a homework assignment with the goal being to "illuminate", and show your feelings about, a poem or song lyrics.
ScottGem
Feb 21, 2006, 08:28 AM
Does the assignment SPECIFY that music should load automatically. Can't she put a button to start playing the music?
RickJ
Feb 21, 2006, 08:36 AM
No. The students are given pretty much free reign to show and say what they want.
If it were a computer class, I'd be more picky, but in this case she wants the music so we're going with it.
LTheobald
Feb 22, 2006, 04:37 AM
No, BGSound won't work in FireFox. It's not a standard's complient tag and is just implementing in IE. If you want the sound to work in most browsers, use the embed tag (or the object tag)
<embed src="something.wav" autostart="true" width="144" height="60"/>
More info here (http://www.w3schools.com/media/media_browsersounds.asp)
And I agree - sound on websites can be annoying. But for a kids school project, we'll let this slide :) What's really annoying is though smiley adverts you see where you pass your mouse over it and it screams "Helloooo" in a stupid way. Those I hate. Anyway, that's for another topic :)