473,659 Members | 3,348 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 insertAdjacentH TML -->
<script type="text/javascript" language="JavaS cript"><!--
var arPreloadSounds = new Array();
arPreloadSounds[0] = "sound.wav" ; // sounds to preload :

document.write( '<BGSOUND ID="auIEContain er">');
var IE=(navigator.a ppVersion.index Of("MSIE")!=-1 && document.all)?1 :0;
var NS=(navigator.a ppName=="Netsca pe"&&navigator. plugins["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.i nsertAdjacentHT ML("BeforeEnd", Str);
}

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

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

auCon = IE? document.all.au IEContainer:auE mb;
auCon.control = AudioControl;
}

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

function PlaySound(whSou nd)
{
if (window.auCon)
auCon.control(w hSound,true);
}

function StopSound(whSou nd)
{
if (window.auCon)
auCon.control(w hSound,false);
}
//--></script>
</head>
<body>
<!-- SIMPLE WAY (IE ONLY) -->
<bgsound id=music loop=1 autostart="fals e">
<a href="#" onMouseOver="do cument.all.musi c.src='sound.wa v'">SIMPLE 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="Pl aySound(0);">EV OLUATED WAY</a><p>
</body>
</html>
Dec 1 '05 #1
5 1380
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.javas cript 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************ ****@PointedEar s.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#ps1P ost>
PointedEars
Dec 2 '05 #6

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

Similar topics

4
2565
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 the url isn't opened in the moeder window. How come and how can I fix it so it works in Netscape too? Thanks in advance for any answers. Mrco
15
7274
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 same problem. Internet Explorer 6 and Opera 7 have no problems with it. <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'> <script>document.write (window.history.length);</script>
9
2546
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 make my scripts multi-browser, when they don't bother giving me basic documentation?
2
3073
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 the delete row button crashes the browser. Why ? What is the correct way to do this ? I am stumped why this following code works in IE and Opera but crashes Netscape 7 (ie makes it disappear and try to send a bug report etc).
3
2073
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 Opera, not with Netscape and Mozilla:
2
1477
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 with 6, they're both fairly modern - aren't they? I'm not looking for someone else to do the legwork, just point me in the right direction. It looks like it's down to some browser-feature
5
8211
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 browser-agnostic (i.e., works with Netscape, version 4x, 7x, etc). My question is this: I have about 10 table rows, each tagged with a class attribute (<tr class="billing" style="display:none">) that I wish to make visible or invisible in response...
13
4151
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 get *9*. In the example table, there are 4 rows with 4 columns each in the tbody. I'd expect 4 child nodes for the table body with 4 children each. I get those 4 plus 5 alerts in Mozilla/Netscape. I get only those 4 in IE and Opera. Note that...
26
2177
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 ? And is there a way around the problem ?
0
8428
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8335
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8747
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8528
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2752
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.