Solved

Embedding Autoloading Sound

Posted on 1998-06-19
4
150 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Find out what you should include to make the best professional email signature for your organization.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

734 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