473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Do you hear something in Netscape, Opera, Mozilla ?

Hello,

Here is a page which contains an "evoluated" (to distinguish-it from the
simple one) way to hear sound on a html page event. From my memory, it
worked under all major browsers, but didn't succeed these last days.

I've just tried it today under IE6, Netscape 7, Mozilla 7 and Opera 1.6.
And it only works under IE.

Could you try, please. Is it the same for you ?

Here is the entire HTML file :
------------------------------
<html>
<head>
<!-- SOUND CODE (for évoluated way)
NB : not in external .js due to pb on insertAdjacentHTML -->
<script type="text/javascript" language="JavaScript"><!--
var arPreloadSounds = new Array();
arPreloadSounds[0] = "sound.wav"; // sounds to preload :

document.write('<BGSOUND ID="auIEContainer">');
var IE=(navigator.appVersion.indexOf("MSIE")!=-1 && document.all)?1:0;
var NS=(navigator.appName=="Netscape"&&navigator.plugi ns["LiveAudio"])?
1:0;
var ver4 = IE||NS? 1:0;

function PreloadSounds()
{
var Str;

if (!ver4)
return;

if (NS)
{
auEmb = new Layer(0,window);
}
else
{
Str = "<DIV ID='auEmb' STYLE='position:absolute;'></DIV>";
document.body.insertAdjacentHTML("BeforeEnd",Str);
}

Str = '';
for (i=0; i<arPreloadSounds.length; i++)
Str += "<EMBED SRC='" + arPreloadSounds[i] + "'
AUTOSTART='FALSE' HIDDEN='TRUE'>";

if (IE)
{
auEmb.innerHTML = Str;
}
else
{
auEmb.document.open();
auEmb.document.write(Str);
auEmb.document.close();
}

auCon = IE? document.all.auIEContainer:auEmb;
auCon.control = AudioControl;
}

function AudioControl(whSound,play)
{
if (IE)
this.src = play? arPreloadSounds[whSound]:'';
else
eval("this.document.embeds[whSound]." + (play? "play
()":"stop()"));
}

function PlaySound(whSound)
{
if (window.auCon)
auCon.control(whSound,true);
}

function StopSound(whSound)
{
if (window.auCon)
auCon.control(whSound,false);
}
//--></script>
</head>
<body>
<!-- SIMPLE WAY (IE ONLY) -->
<bgsound id=music loop=1 autostart="false">
<a href="#" onMouseOver="document.all.music.src='sound.wav'">S IMPLE WAY
</a><p>

<!-- EVOLUATED WAY (CROSS-BROWSER CONSIDERATION)
***TODO : doesn't seems to work under NN7, Mozilla 7 and Opera 1.6
???
-->
<a href="#" onMouseOver="PlaySound(0);">EVOLUATED WAY</a><p>
</body>
</html>
Dec 1 '05 #1
5 1362
VK

Asterbing wrote:
Hello,

Here is a page which contains an "evoluated" (to distinguish-it from the
simple one) way to hear sound on a html page event. From my memory, it
worked under all major browsers, but didn't succeed these last days.

I've just tried it today under IE6, Netscape 7, Mozilla 7 and Opera 1.6.
And it only works under IE.


Yes, this is an old IE4 / NN4 cross-browser media script.
It uses <bgsound> object in IE and Java-based Bitnik Software plugin in
NN (with was build in NN 4.x).

NN 4 is gone as well as Bitnik Software itself (I even not sure if I
spelled it properly Bitnik? Bitnick? Bitnique? Sounded alike anyway).

AFAIK neither Netscape > 4, nor Opera not Firefox do not currently
provide a build-in media interface (?) So a scriptable Flash movie is
the only option (?)

Dec 1 '05 #2
VK said the following on 12/1/2005 10:28 AM:
Asterbing wrote:
Hello,

Here is a page which contains an "evoluated" (to distinguish-it from the
simple one) way to hear sound on a html page event. From my memory, it
worked under all major browsers, but didn't succeed these last days.

I've just tried it today under IE6, Netscape 7, Mozilla 7 and Opera 1.6.
And it only works under IE.

Yes, this is an old IE4 / NN4 cross-browser media script.
It uses <bgsound> object in IE and Java-based Bitnik Software plugin in
NN (with was build in NN 4.x).

NN 4 is gone as well as Bitnik Software itself (I even not sure if I
spelled it properly Bitnik? Bitnick? Bitnique? Sounded alike anyway).

AFAIK neither Netscape > 4, nor Opera not Firefox do not currently
provide a build-in media interface (?) So a scriptable Flash movie is
the only option (?)


<embed src="................

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 1 '05 #3
VK wrote:
Yes, this is an old IE4 / NN4 cross-browser media script.
It uses <bgsound> object
You mean the `bgsound' _element_, which is not Valid HTML.
in IE and Java-based Bitnik Software plugin in
NN (with was build in NN 4.x).

NN 4 is gone as well as Bitnik Software itself
Neither is gone. As for the latter, it is only that Beatnik, Inc. has
discontinued its support. There are no new versions of that plugin
available:
(I even not sure if I spelled it properly Bitnik? Bitnick? Bitnique?
Sounded alike anyway).
<URL:http://www.beatnik.com/products/player.html>
AFAIK neither Netscape > 4, nor Opera not Firefox do not currently
provide a build-in media interface (?)
True, because that interface has always been provided by the plugin,
to be accessed through the DOM. Joined efforts of the major vendors
to standardize the former have begun some time ago:

<URL:http://www.mozilla.org/press/mozilla-2004-06-30.html>

BTW: Forget about `embed', that is not Valid HTML either. Use the
`object' element from HTML 4.01 instead, supported in the named
browsers. Be sure to use its content to provide for an alternative
in case it is not supported (I think a visible hyperlink to the used
media would suffice.)
So a scriptable Flash movie is the only option (?)


It is not. However, depending on the target environment, it is probably
the most reliable and fastest option (even though it requires another
plugin, the Macromedia Flash Player Plug-in).
PointedEars
Dec 2 '05 #4
In article <52****************@PointedEars.de>, Po*********@web.de
says...
VK wrote:
Yes, this is an old IE4 / NN4 cross-browser media script.
It uses <bgsound> object


You mean the `bgsound' _element_, which is not Valid HTML.
in IE and Java-based Bitnik Software plugin in
NN (with was build in NN 4.x).

NN 4 is gone as well as Bitnik Software itself


Neither is gone. As for the latter, it is only that Beatnik, Inc. has
discontinued its support. There are no new versions of that plugin
available:
(I even not sure if I spelled it properly Bitnik? Bitnick? Bitnique?
Sounded alike anyway).


<URL:http://www.beatnik.com/products/player.html>
AFAIK neither Netscape > 4, nor Opera not Firefox do not currently
provide a build-in media interface (?)


True, because that interface has always been provided by the plugin,
to be accessed through the DOM. Joined efforts of the major vendors
to standardize the former have begun some time ago:

<URL:http://www.mozilla.org/press/mozilla-2004-06-30.html>

BTW: Forget about `embed', that is not Valid HTML either. Use the
`object' element from HTML 4.01 instead, supported in the named
browsers. Be sure to use its content to provide for an alternative
in case it is not supported (I think a visible hyperlink to the used
media would suffice.)
So a scriptable Flash movie is the only option (?)


It is not. However, depending on the target environment, it is probably
the most reliable and fastest option (even though it requires another
plugin, the Macromedia Flash Player Plug-in).
PointedEars


OK, I'll see around <object>. Thanks for the help
Dec 2 '05 #5
Asterbing wrote:
[Full quote]

OK, I'll see around <object>. Thanks for the help


You are welcome. But please learn how to quote on Usenet.
Bandwidth, disk space and free time are precious resources.

<URL:http://jibbering.com/faq/faq_notes/pots1.html#ps1Post>
PointedEars
Dec 2 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Marco | last post by:
I made an html-page with this line in it: <A HREF="http://www.bla.com" onClick="javascript:window.close()" target="moeder">link</A> It works very well in Internet Explorer, but in Netscape 7...
15
by: Peter Bremer | last post by:
Hi all, I've written this little piece of code, which doesn't seem to work in Mozilla 1.5. I haven't tried it on other Gecko browsers, but I've found some indication that Netscape 6+ has the...
9
by: rez | last post by:
I find it rather frustrating that Netscape 4.x is "no longer supported:" http://help.netscape.com/products/client/communicator/reflib.html Same seems true with IE. How am I ever supposed to...
2
by: Dom | last post by:
Hi, I am trying to get a dynamic table going. You click a button to add a row. In the newly created row a button to delete the row is placed (try the code example below). In Netscape, pressing...
3
by: Simba | last post by:
Hi, I've written some javascript routines for Internet Explorer and Opera. Could you tell me the Netscape and Mozilla equivalents? Thanks ------------------------- //this works with...
2
by: MV | last post by:
Hi, I want to try and get a lottery type script to run in these two browsers before i put it on my site. It runs OK in I.E.6 and my friend says it works in netscape 7 so i can't see the problem...
5
by: Harry Gould | last post by:
To all, I'm a newbie here, so please bear with me. I develop web pages for a company intranet where Internet Explorer 6 is the standard. Now I must develop a public internet website that is...
13
by: kaeli | last post by:
Can anyone explain this to me? It's driving me insane. Save this and run it in IE or Opera and then in Mozilla or Netscape 6+. In IE/Opera, I get the expected 4 alerts. In Mozilla/Netscape, I...
26
by: Roger Desparois | last post by:
Hi, I need help : I found the simplest and most precise way to open and close submenu layers. it works perfectly with IE, but for some odd reason NS won't recognize it. Can anyone tell me why...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.