Solved

Embedding Autoloading Sound

Posted on 1998-06-19
4
147 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTML CSS 7 38
Return data with AJAX, JQUERY and PHP 13 55
Angular 2 - Issue in page Layout 2 46
Javascript create file issue 4 45
Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
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)

930 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

14 Experts available now in Live!

Get 1:1 Help Now