October 22, 2020, 11:04:38 pm
News: IF YOU ARE A MEMBER FROM THE ORIGINAL SITE AND CAN'T LOGIN. POST IN THE FEEDBACK FORUM (AS GUEST) AND AN ADMIN WILL ASSIST YOU TO ACCESS THE SITE!
Pages: [1]   Go Down
Author Topic: Lost Topic Title  (Read 917 times)
fishsponge
Full Member
*

Stars: +0/-0
Offline Offline

Posts: 105



WWW
« on: November 01, 2003, 12:08:21 pm »

Hey ppl... can anyone help? I can't get my browser detection and MIDI file to work in Netscape... here's the code i'm using:
Code:
<script LANGUAGE="JavaScript"> <!--
if (navigator.appName == "Netscape")
 { document.write('<embed SRC="music.mid" AUTOSTART=true HIDDEN=true LOOP=true></embed>');
 }
 else
 { document.write('<bgsound src="music.mid" loop=-1 width=200 height=55>');
 }
//-->
</SCRIPT>
i've placed the code into "index.htm" here:
Code:
<html>
<head><title></title></head>
<body>
(SCRIPT STARTS HERE)
any ideas why Netscape doesn't play the MIDI file, but IE does??

Thanks in advance... Grin
Logged

[span style=\'font-size:8pt;line-height:100%\']><> FishSponge <><





:

[] [] [][/span]

Pc_Madness
Ancient Poster
*

Stars: +0/-0
Offline Offline

Posts: 5349



WWW
« Reply #1 on: November 02, 2003, 05:50:22 am »

I think you need to have that script inside the <HEAD> </HEAD> Tags. thumb_yello I think Mozilla/Firebird/Netscape should use the <BGSound> as well, as it appears to be part of the HTML standard. unsure
Logged


fishsponge
Full Member
*

Stars: +0/-0
Offline Offline

Posts: 105



WWW
« Reply #2 on: November 02, 2003, 01:14:13 pm »

where did you see that it was an HTML standard? Someone else on a different forum asked why i was using the bgsound tag... and that it wasn't standard...

Basically, my problem is that i spent hours (literally) looking around the web for the perfect, failsafe solution to playing a MIDI file on a simply web page. I found loads and loads of solutions, and the most common one was the one on my page now. why doesn't it work though?

i've had people saying it doesn't work in Netscape at all, ever. It doesn't work in IE5.5, and it only intermittently works in other versions of IE... what am i doing wrong?!? lol
Logged

[span style=\'font-size:8pt;line-height:100%\']><> FishSponge <><





:

[] [] [][/span]

CornedBee
Ancient Poster
*

Stars: +0/-0
Offline Offline

Gender: Male
Posts: 5258


WWW
« Reply #3 on: November 02, 2003, 05:15:51 pm »

Simple, failsafe solution: don't play it.
Music that automatically starts on web pages is one of the most annoying things I can imagine. I always have Winamp running in the background, suddenly having another sound overlayed usually makes me close the browser as fast as possible.

<bgsound> is a proprietary IE tag. Maybe Gecko has support for it though.
Logged

All the buzzt
CornedBee

"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond

"This is how Liberty dies - with thunderous applause."
Senator Padmé Amidala - Revenge of the Sith

fishsponge
Full Member
*

Stars: +0/-0
Offline Offline

Posts: 105



WWW
« Reply #4 on: November 02, 2003, 05:18:57 pm »

normally i'd agree with you... although, given the nature of this site, that MIDI file has to be played.. you will see why when the whole thing is finished Grin
Logged

[span style=\'font-size:8pt;line-height:100%\']><> FishSponge <><





:

[] [] [][/span]

CornedBee
Ancient Poster
*

Stars: +0/-0
Offline Offline

Gender: Male
Posts: 5258


WWW
« Reply #5 on: November 02, 2003, 05:52:33 pm »

Ok, let's get to the technical issues.

As stated, <bgsound> is a proprietary tag. Problem #1.

MIDI is a format that needs a soft- or hardware MIDI engine to play. This means that playing is not trivial. Ergo not that good default support. Problem #2.

<embed> is not a good tag, for which reason it's deprecated too. Problem #3.

The new <object> could help, but is not supported by NS4. Problem #4.

If you use <object>, you can either: set the class ID of the ActiveX object you want to handle the content. Bad idea: IE-only. Or Moz with a plugin. Or you can specify the MIME type of the content (MIDI is audio/x-midi or audio/midi I believe). The downside is that you can't know which app starts (Media Player? Real Player? Quicktime? XMMS?), nor can you know if this app requires user interaction for actually beginning to play, and there's no standardized set of <param> tags that all players accept. Problem #5.

Conclusion: no web page NEEDS sound. If you have a high-multimedia page, do one version completly in Flash, and then provide a non-Flash version without sound.
Logged

All the buzzt
CornedBee

"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond

"This is how Liberty dies - with thunderous applause."
Senator Padmé Amidala - Revenge of the Sith

fishsponge
Full Member
*

Stars: +0/-0
Offline Offline

Posts: 105



WWW
« Reply #6 on: November 02, 2003, 07:53:26 pm »

ok... thanks for your help... the problem is that i'm trying to create a rival to the original HamsterDance site (remember?)... how did they do the sound for the first version of that?? I swear it was a looping MIDI file... wasn't it??
Logged

[span style=\'font-size:8pt;line-height:100%\']><> FishSponge <><





:

[] [] [][/span]

Sastraxi
Ancient Poster
*

Stars: +0/-0
Offline Offline

Posts: 6032



WWW
« Reply #7 on: November 02, 2003, 07:55:26 pm »

It was an mp3 or a wave  dunno
Logged


Got a problem? Make sure to post in the [span style=\'color:#ff0000\']appropriate[/span] forum!
Someone took the time to answer your question? If the answer is sufficient, show the person you appreciate their help with a follow-up message.
Problem solved? Edit your original post, and change the title to add [resolved] to the end of it.

CornedBee
Ancient Poster
*

Stars: +0/-0
Offline Offline

Gender: Male
Posts: 5258


WWW
« Reply #8 on: November 03, 2003, 09:32:34 am »

Definitly not MIDI.

Unfortunatly the original page doesn't seem to exist anymore, the new one is Flash.
Logged

All the buzzt
CornedBee

"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond

"This is how Liberty dies - with thunderous applause."
Senator Padmé Amidala - Revenge of the Sith

Pages: [1]   Go Up
Print
 
Jump to: