Closed
Bug 306115
Opened 19 years ago
Closed 19 years ago
Can't play midi with Java
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 264286
People
(Reporter: itisspam, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
I am playing a game called *Runescape* at www.runescape.com
The MIDI music of this game can be played in other browser but not in Firefox. I
think it's because object "document.app" in Firefox does not provide these music
method in the lines of the Java script,
1. var wave=document.app.getwave();
2. var midi=document.app.getmidi();
3. midibox.src=fademidi;,
and so it causes error all the time.
I hope Firefox could add those methods in the HTML codes.
----------------------------------------------
Whole page source:
<html>
<head>
<META HTTP-EQUIV='Expires' CONTENT='0'>
<META HTTP-EQUIV='Pragma' CONTENT='no-cache'>
<META HTTP-EQUIV='Cache-Control' CONTENT='no-cache'>
<title>RuneScape Game</title>
<style>
body, td, p
{
font-family:Arial,Helvetica,sans-serif;
font-size:11px;
}
body {margin:0px; overflow: auto;}
.b {border-style: outset; border-width:3pt; border-color:#373737}
.e {border:2px solid #382418}
.c {text-decoration:none}
A.c:hover {text-decoration:underline}
</style>
</head>
<SCRIPT LANGUAGE='javascript'>try { if (top == self)
{top.location.href='http://www.runescape.com/'; } } catch(er) { } </SCRIPT>
<body bgcolor=black text="white" link=#90c040 alink=#90c040 vlink=#90c040
style="margin: 0;" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0"
onload=startloop();><center>
<center><table cellpadding=0 cellspacing=1>
<tr><td align=center>
<table border=0 background='http://www.runescape.com/img/gamewin/navbar.gif'
cellspacing=0 cellpadding=0 width=765 height=25><tr>
<td width=5></td><td><img border=0 name='jageximg' border=0
src='http://www.runescape.com/img/gamewin/navbar_jagex.gif'
style='vertical-align: middle'></td>
<td></td><td valign=center><a
href="http://www.runescape.com/aff/runescape/frame2.cgi?page=title.html"
ID='menulink'><img border=0 name='jageximg' border=0
src='http://www.runescape.com/img/gamewin/navbar_mainmenu.gif'
style='vertical-align: middle'><font color=white>Main Menu</font></a></td>
<td></td><td valign=center><a
href="http://www.runescape.com/aff/runescape/frame2.cgi?page=serverlist.cgi?lores.x=0&plugin=0"
ID='menulink2'><img border=0 name='jageximg' border=0
src='http://www.runescape.com/img/gamewin/navbar_mainmenu.gif'
style='vertical-align: middle'><font color=white>World Select</font></a></td>
<td></td><td valign=center><a
onclick="window.open('http://www.runescape.com/aff/runescape/worldmap/popupworldmap.html','WorldMap','width=635,height=550');return
false;"
href="http://www.runescape.com/aff/runescape/worldmap/popupworldmap.html"
target="WorldMap"><img border=0 name='worldmapimg' border=0
src='http://www.runescape.com/img/gamewin/navbar_worldmap.gif'
style='vertical-align: middle'><font color=white>World Map</font></a></td>
<td></td><td valign=center><a
href="http://www.runescape.com/aff/runescape/frame2.cgi?page=howtoplay.html"
target="Manual"><img border=0 name='manualimg' border=0
src='http://www.runescape.com/img/gamewin/navbar_manual.gif'
style='vertical-align: middle'><font color=white>Manual</font></a></td>
<td></td><td valign=center><a
href="http://www.runescape.com/aff/runescape/frame2.cgi?page=guides/rules.html"
target="RulesSecurity"><img border=0
src='http://www.runescape.com/img/gamewin/navbar_rules.gif'
style='vertical-align: middle'><font color=white>Rules & Security</font></a></td>
<td width=5></td></tr></table>
</td></tr>
<tr><td align=center>
<applet name=app width=765 height=503 archive=loader350778520.jar
code=loader.class MAYSCRIPT>
<param name=cabbase value=loader-1747920261.cab>
<param name=portoff value=0>
<param name=nodeid value=86>
</applet></td></tr>
</table>
<bgsound id=midibox loop=0 volume=0 autostart=yes>
<bgsound id=wavebox loop=0 volume=0 autostart=yes>
<script language="javascript">
var fade=200;
var fademidi=null;
var fadevol=0;
function givetrue() {return true;}
function musicloop() {
var midi=document.app.getmidi();
if (midi!="none") {
var midivol=document.app.getmidivol();
var midifade=document.app.getmidifade();
if (midi=="voladjust" && fademidi!=null) {fadevol=midivol; return;}
fademidi=null;
if (midi=="stop") {midibox.src="c:\silence.mid"; fade=200; return;}
if (midi=="voladjust") {midibox.volume=midivol; if (midifade==1)
fade=-(midivol/25); else fade=200; return;}
if (midifade==1) {fademidi=midi; fadevol=midivol;}
else {midibox.src=midi; midibox.volume=midivol; fade=200;}
}
if (fademidi!=null) {
fade=fade+1;
midibox.volume = -(fade*25);
if (fade>=144) {
midibox.src=fademidi; midibox.volume=fadevol;
fademidi=null; fade=-(fadevol/25);
}
}
var wave=document.app.getwave();
if (wave!="none") {
var wavevol=document.app.getwavevol();
wavebox.src=wave; wavebox.volume=wavevol;
}
}
function startloop() {
onerror=givetrue;
setInterval("musicloop()",50);
}
function ConfirmMenu(e) {
if (e == null) e = event;
var response=window.confirm("Clicking this link will exit the game and take
you to the main menu.\nPlease log out of the game before exiting.\nClick OK if
you have safely logged out.");
if (response) document.location.href=menulink1;
if (e.cancelable) e.preventDefault();
return false;
}
function ConfirmMenu2(e) {
if (e == null) e = event;
var response=window.confirm("Clicking this link will exit the game and take
you to the world select page.\nPlease log out of the game before exiting.\nClick
OK if you have safely logged out.");
if (response) document.location.href=menulink2b;
if (e.cancelable) e.preventDefault();
return false;
}
function init() {
if (document.getElementById) {
var node = document.getElementById('menulink');
if (node != null) {
menulink1=node.getAttribute('href');
node.setAttribute('href','');
node.onclick = ConfirmMenu;
}
node = document.getElementById('menulink2');
if (node != null) {
menulink2b=node.getAttribute('href');
node.setAttribute('href','');
node.onclick = ConfirmMenu2;
}
}
window.scroll(0,0);
}
init();
</script>
</center></body></html>
Reproducible: Always*** This bug has been marked as a duplicate of 264286 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•