Solved

Embedding Autoloading Sound

Posted on 1998-06-19
4
149 Views
Last Modified: 2012-05-04
What HTML tag can I use to embed a sound file to Autostart and be invisble, that won't start JAVA in Netscape 4.  I currently have <EMBED SRC="wolfhowl.wav" WIDTH=0 HEIGHT=0 autostart=true hidden=true> on my home page.  This works, but it causes Netscape to "Start Java" before it runs.  This causes some slower machines to crash.  Older versions (3.0+) work fine but anything new (like 4.0+) starts Java, and I don't want that to happen.  It is the "Embed" tag that does it (I think).

I need some code that will easily work for both Netscape and IE.

Thanks.
0
Comment
Question by:robin013197
  • 2
4 Comments
 
LVL 1

Expert Comment

by:Tuff
ID: 1844263
Hi Robin,

Try this, it may not work in both or all browsers (someday the 2 will get their acts TOGETHER) but you can try this tag..
<BGSOUND SRC="wolfhowl.wav" autostart=true hidden=true loop="10"> on the loop you can set as many times that you like or you can put this in loop="infinite" and also try it by removing the autostart=true hidden=true , usually in IE the audio will start on it's own (in some versions)

Good Luck
0
 

Author Comment

by:robin013197
ID: 1844264
BGSOUND SRC tag for IE does not work with Netscape (yet).  Though IE does read the EMBED tag just fine.  Any other suggestions?
0
 
LVL 1

Expert Comment

by:Tuff
ID: 1844265
:( Nope I looked thru my HTML book from O'Reilly and that was all I could find on audio other than the embed tag and what you had for the embed tag was correct I dont know why your Java is starting when it opens other than the idea of the java script has the same code in it i,e. autostart??
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 100 total points
ID: 1844266
AFIK You cannot stop NS4 from starting Java when it encounters a sound file - a pain but I think it is necessary for NS to do that.

To have your cake and eat it too:

<SCRIPT LANGUAGE"JavaScript"><!--
document.write('<BGSOUND SRC="wolfhowl.wav" autostart=true hidden=true loop="10">'); // have the MSIE user go amok having his computer howl at 2am
if (navigator.appName == "Netscape")
   document.write ('<EMBED src="wolfhowl.wav" autostart=true loop=true width=3 height=1>');
// --></script>

Michel
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question