By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,993 Members | 1,335 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,993 IT Pros & Developers. It's quick & easy.

simultaneous sounds

P: n/a
I want to write a game, and sounds will really add to it. Note that I
would always make the sounds optional. I hate it when I go to a URL and
unexpectedly get sounds or music.

I have played with bgsound in IE, and found I can have simultaneous sounds
using multiple bgsound tags. I have done a google search, and the only
results I found were for "multiple sounds", and all of these really meant
"consecutive sounds" -- one sound following another. I could not find
anything that answered this when I searched for ("simultaneous sounds" or
"concurrent sounds") and ("javascript" or "html" or "bgsound").

My question: Do other browsers allow simultaneous sounds? I suspect not,
since I understand Netscape (and others?) use plug-ins, and I doubt the
plug-in can take more than one sound at a time. But maybe someone has found
a way???

Here is my URL for testing some simultaneous sounds, if you want to play
with it. It requires IE and uses bgsound:
http://home.comcast.net/~jimnbigd/losewin.html

Thanks...Jim...
Jul 23 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
I'm not sure if they do, but you would probably be better to do that
with either Flash, Shockwave, or a java applet. The bgsound and embed
tags behave very differently in different browsers. ie in Windows XP
with IE 6, there is no way to have a sound clip only play through once;
it loops no matter what. On every older version of IE, and almost
every other browser, it has always worked.

Jul 23 '05 #2

P: n/a

"DJ Craig" <sp**@djtricities.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
I'm not sure if they do, but you would probably be better to do that
with either Flash, Shockwave, or a java applet. The bgsound and embed
tags behave very differently in different browsers. ie in Windows XP
with IE 6, there is no way to have a sound clip only play through once;
it loops no matter what. On every older version of IE, and almost
every other browser, it has always worked.

But I'm using windows XP home edition and IE 6.0 on my home computer, and my
sounds do not loop.
....Jim...
Jul 23 '05 #3

P: n/a
Jim,
I haven't had a problem with Firefox and simultaneous sounds. Remember
that IE is also using a plugin (Windows Media Player). Like you I had
to use multiple tags, but rather than using the <bgsound> tag, I used
<embed>.

Maybe that'll do what you need it to.

Hope it helps.

Jul 23 '05 #4

P: n/a
"Random" <ra*******@gmail.com> wrote in message
news:11********************@g14g2000cwa.googlegrou ps.com...
Jim,
I haven't had a problem with Firefox and simultaneous sounds. Remember
that IE is also using a plugin (Windows Media Player). Like you I had
to use multiple tags, but rather than using the <bgsound> tag, I used
<embed>.

Maybe that'll do what you need it to.

Hope it helps.

Thanks. Yes, this helps. I was not aware that <bgsound> uses Windows
Media, but it makes sense. I wonder if Quicktime or Realplayer plugins will
do simultaneous sounds with multiple <embed> tags. I'll have to try it. By
the way, I know this is not directly javascript, but I use javascript to
control these sounds.

Question with embed: Does changing the src value for an <embed> tag play a
new sound (or even replay the same sound if the src is the same value)? I
know it does with <bgsound>.

Thanks...Jim...
Jul 23 '05 #5

P: n/a
I really don't know if it autoplays a new sound, but changing the src
attribute will load a new sound, yes.

Generally, you can count on any given plugin implementing .play(),
..stop(), and so forth. In what I did, I didn't specify any specific
plugin requirement because I honestly just didn't feel like it, and I
haven't had any problems with cross-compatibility.

I used three <embed>s, the first having an intro sound, the next two
loading the same sound. Knowing the duration of the second clip, I
JavaScriptically looped them so that there's a slight bit of overlap.
It plays the first and, when that's almost done, plays the second. When
the second is almost done, it plays the first. In most cases it works
seamlessly.

Jul 23 '05 #6

P: n/a
Jimnbigd wrote:
"DJ Craig" <sp**@djtricities.com> wrote [...]
I'm not sure if they do, but you would probably be better to do that
with either Flash, Shockwave, or a java applet. The bgsound and embed
tags behave very differently in different browsers. [...]


Of course, because there are no such things. There are `bgsound' and
`embed' _elements_ (with start tag, optional PCDATA content and end tag)
that are not part of Valid HTML. `object' elements are to be used instead,
however the API provided for HTMLObjectElement objects depends on the
plugin used for display.

Efforts to standardize that API among user agents and plugins are already
underway but did not yet result in a Web standard or any standards
compliant API implementation.
PointedEars
Jul 23 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.