Jump to content
smiles

bgsound

Recommended Posts

if you want to have the bgsound continue with the different song , how can you write it ???for examples , you have the song1 for bgsound , when it ends , you hear the song2 and to be continue like that ??? :)

Share this post


Link to post
Share on other sites

it would have to be one continuous song file without incorporating some other technology like flash - then you would not be using the bgsound tag or approach, you'd be using flash.

Share this post


Link to post
Share on other sites
it would have to be one continuous song file without incorporating some other technology like flash - then you would not be using the bgsound tag or approach, you'd be using flash.

:) well , before believing what you say is true , I will try :)

Share this post


Link to post
Share on other sites
:) well , before believing what you say is true , I will try  :)

You can do what you want with plain JavaScript, get the id of the bgsound then give it a new song, i have set it to play a new song after 5 then 10 seconds using setTimeout, just change that to 4 minutes or whatever, works like so:
<html><head><script type="text/javascript">function song2(){document.getElementById('bgsong').src="2.mp3";}function song3(){document.getElementById('bgsong').src="3.mp3";}setTimeout("song2()",5000) //play song 2 after 5 secondssetTimeout("song3()",10000) //play song 3 after 10 seconds</script></head><body><bgsound id="bgsong" src="1.mp3"></body></html>

Share this post


Link to post
Share on other sites

I think bgsound is not apreciated by W3.is there anotherway of doing it? in css or other language?

Share this post


Link to post
Share on other sites

See here: http://www.w3schools.com/media/media_browsersounds.asp

The <embed> element is supported by both Internet Explorer and Netscape, but it is not a standard HTML or XHTML element. The World Wide Web Consortium (W3C) recommend using the <object> element instead.
W£C recommends using <object>

Share this post


Link to post
Share on other sites

To be honest im not sure but using just the <object> tag should be fine now, i will check it out.

Share this post


Link to post
Share on other sites

I checked this out, object tag: works in IE and Opera but not FireFox: http://www.w3schools.com/media/tryit.asp?f...soundwaveobjectGiven that The World Wide Web Consortium (W3C) recommend using the <object> element i find it hard to believe that FireFox doesn't play it, it's not even asking to download a plugin.Maybe someone can shed some light on this :)

Share this post


Link to post
Share on other sites
I checked this out, object tag: works in IE and Opera but not FireFox: http://www.w3schools.com/media/tryit.asp?f...soundwaveobjectGiven that The World Wide Web Consortium (W3C) recommend using the <object> element i find it hard to believe that FireFox doesn't play it, it's not even asking to download a plugin.Maybe someone can shed some light on this :)

Scott,Object Tag does indeed work with Firefox. Check out the code in this page, using the Object Tag: Object Tag TestI use Firefox 1.5.0.1 and I'm listening to the WAV file as I type this...

Share this post


Link to post
Share on other sites

Your link didn't work in my FireFox 1.0.7 or Opera 8Firefox did say i needed additional pluggins but then said they weren't available when i tried to download :)*Updated*Downloaded newer browser versions FireFox 1.5.0.1 - still asking for plugin which i cant downloadOpera 8.5.3 - works ok

Edited by scott100

Share this post


Link to post
Share on other sites

Scott,If you use QuickTime for WAV files then you need these files in Firefox's plugins folder:npqtplugin.dll npqtplugin2.dllnpqtplugin6.dllnpqtplugin7.dllnsIQTScriptablePlugin.xptQuickTimePlugin.classYou might also want to install the ActiveX plugin which is used for Windows Media Player (not the deadly Windows ActiveX). The filename is npmozax.dll, and can be either downloaded or installed here: http://www.iol.ie/~locka/mozilla/plugin.htm#download Use the plugin for Firefox 1.5, as it works for 1.5.0.1.Back to my original question, which I have answered for myself, after some research. Using both the bgsound and embed tags was definitely required in order for the sound files to be cross browser compatible, i.e., Netscape/Mozilla/Firefox/SeaMonkey/Opera/IE. However, with the newer browsers, as you found, it is no longer required. If you want your pages, which have sounds, to be backwards compatible, it is still necessary to use both the embed and object tags.Cheers!

Share this post


Link to post
Share on other sites

Still having no luck with firefox, i cant get any of the downloads to work and cant hear any sounds wih the browser :)

Share this post


Link to post
Share on other sites

Here is a print screen of my problemhttp://www.myfilestash.com/userfiles/scott100/ff.jpgI click on install missing pluginsThe followings plugins are availableApple QuicktimeClick on nextApple Quicktime not availableIt has done this for FF 1.0.7 and 1.5.0.1, so im guessing the fault is with my pc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×