Solved

Embedding Autoloading Sound

Posted on 1998-06-19
4
146 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
Comment Utility
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
Comment Utility
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
Comment Utility
:( 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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Do you want to insert HTML5 video into your site? This is the tutorial how to do so. What are the main advantages of HTML5 video? 1) Have good compression, good image quality, and low decode processor use. 2) It is royalty-free 3) It is easi…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now