/    Sign up×
Community /Pin to ProfileBookmark

Background sound stuff

Hi, two questions about background sound here, if anyone can answer it would be greatly appreciated.

#1. what code/scripte can I use to have background sound that will work in most browsers (e.g., at least Firefox, IE, and Opera)?

#2. How can I set it up so that the sound does not restart upon going to a new page?

to post a comment
Full-stack Developer

12 Comments(s)

Copy linkTweet thisAlerts:
@bmassauthorAug 09.2006 — I am also looking for a script that will allow me to use an image/button to turn the sound on and off.

I do realize that having background sound is bad for a website and a lot of people hate it, but I cannot convince my client otherwise, and he insists on the background sound, so if you could help it would be really apprecaited.
Copy linkTweet thisAlerts:
@FleeceAug 09.2006 — bmass:

well its a little tricky. you use frames.

refer to: http://www.webdeveloper.com/forum/showthread.php?t=25066

there may be other ways, sometimes people don't like dealing with frames.

but i think this would work.
Copy linkTweet thisAlerts:
@bmassauthorAug 09.2006 — Thank you very much. There is just the problem that I cannot use the embed function, otherwise it screws up all of the positioning in my site... ?
Copy linkTweet thisAlerts:
@FleeceAug 09.2006 — really? thats odd ..um..

in your website, do you use DIVs?

cuz if you make a DIV with the embed in it, it shouldnt mess up your site.

if your comfortable enough you can show me your code maybe i can take a look at it.
Copy linkTweet thisAlerts:
@FleeceAug 09.2006 — really? thats odd ..um..

in your website, do you use DIVs?

cuz if you make a DIV with the embed in it, it shouldnt mess up your site.

if your comfortable enough you can show me your code maybe i can take a look at it.

or describe how it messes it up
Copy linkTweet thisAlerts:
@bmassauthorAug 10.2006 — Oops! I just realized that I forgot to put in the "width=1 height=1" paramters. Thanks, this should work nicely, but umm... how can I set up a button to turn it on and off? Thanks a lot by the way, I really really appreciate your help with this.
Copy linkTweet thisAlerts:
@bmassauthorAug 14.2006 — I am also greatly confused by the usage of framesets. Could you please explain it a little better? I don't really understand anything except the code itself. I don't get how to implement it. The website is located at www.vvclans.com/db if it helps to look.
Copy linkTweet thisAlerts:
@FleeceAug 19.2006 — If you put a media player inside the actual frame there can be a PAUSE and a PLAY button. But if you want to use buttons...:

http://rainbow.arch.scriptmania.com/scripts/music/music_and_sound.html

Framesets are like...a page inside another page. Multiple regions. So the "MAIN" page is one HTML code, then you insert:

<frameset rows="#,#" cols="#,#">

<frame name="OTHER" src="OTHER.html">

<noframes><body>

</body></noframes>
</frameset>

You make another .html code and you add it in 'OTHER' then that appears in the "MAIN" page. So, if you put the music in the "MAIN" page and only navigate throught the "OTHER" pages, the "MAIN" page basically never reloads....yeah. In the tags like <frame src=""> you can put other things like scolling="" or frameborder=""...things of that nature.

You add text into the <noframes> so when an internet browser does not support frames, that is what will be displayed instead.

So be careful, some internet browsers cannot display frames- which is a problem, yes.
Copy linkTweet thisAlerts:
@bmassauthorSep 03.2006 — Alright, I have the following:
[code=html]<frameset rows="100%,*" cols="100%,*" framespacing="no" frameborder="0">
<frame name="index" src="db/index.php">
<frame name="music" src="music.html">
<noframes><body>

Your browser does not support framesets. This means that you will be unable to experience our website music. Please click <a href="../noframe">here</a> to view our non-frame-based website.

</body></noframes>
</frameset>[/code]


In my frameset document, and all is working fine (except the button which I haven't done yet). It is located at http://www.vvclans.com/test.php. What I need to figure out now, is how to set it up so that when I click on the other links, it goes to that pages, but doesn't stop the music. Any ideas? Thanks.
Copy linkTweet thisAlerts:
@bmassauthorSep 03.2006 — Edit: Nevermind, all figured out.
Copy linkTweet thisAlerts:
@bmassauthorSep 03.2006 — Actually, the sound will not work in Internet Explorer. Does anyone have any ideas as to why? The url is http://www.thedarkbrotherhood.com/index Thanks.

Edit: I had to remove the object tag so that the sound would loop, but I need he opject for a sound on/off button. How can I set it up to loop with the object tag? Thanks again.

P.S. Sorry for the triple post.
Copy linkTweet thisAlerts:
@bmassauthorSep 05.2006 — Another question. How can I set it up so that by clicking a certain link, it cancels out the frameset and redirects to a certain page? Thanks.
×

Success!

Help @bmass spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...