主题:求助~~~ 有谁知道??? 大虾们进来。。
以下是一个论坛里的小游戏 -跑马-
请问大虾们谁知道这个游戏是怎么计算那号马赢~~~
谢谢了。。
<html><head>
<title>赛马实况</title>
<style>
A:visited{TEXT-DECORATION: none}
A:active{TEXT-DECORATION: none}
A:hover{TEXT-DECORATION: none}
A:link{text-decoration: none;}
.t{LINE-HEIGHT: 1.4}
BODY{FONT-FAMILY: georgia, Verdana; FONT-SIZE: 9pt;
background-position: center;
scrollbar-highlight-color: #ffffff;
scrollbar-shadow-color: #FFFFFF;
scrollbar-arrow-color: #FFFFFF;
scrollbar-base-color: #4D86C0;
scrollbar-darkshadow-color: #4D86C0;
scrollbar-track-color: #FFFFFF;
}
TD,DIV{FONT-FAMILY: georgia, Verdana; FONT-SIZE: 9pt}
</style>
<script>
function Horse_timelinePlay(tmLnName, myID) {
if (document.Horse_Time == null) Horse_initTimelines();
tmLn = document.Horse_Time[tmLnName];
if(myID == null) { myID = ++tmLn.ID; firstTime=true;}
setTimeout('Horse_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);
fNew = ++tmLn.curFrame;
for (i=0; i<tmLn.length; i++) {
sprite = tmLn[i];
if (sprite.obj) {
numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {
keyFrm=1;
for (j=0; j<sprite.values.length; j++) {
props = sprite.values[j];
if (numKeyFr != props.length) {
if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];
else sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];
}else{
while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;
if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];
else sprite.obj[props.prop2][props.prop] = props[keyFrm-1];
}}}}
}}
}
function Horse_initTimelines() {
document.Horse_Time = new Array();
document.Horse_Time[0] = new Array();
document.Horse_Time["horse"] = document.Horse_Time[0];
document.Horse_Time[0][0]=new String("sprite");
document.Horse_Time[0][0].obj=document.all ? document.all["h1"] : null;
document.Horse_Time[0][0].keyFrames=new Array(1,30);
document.Horse_Time[0][0].values=new Array(2);
document.Horse_Time[0][0].values[0]=new Array(0,24,24,24,45,57,78,105,111,120,126,129,138,153,156,162,180,204,207,219,222,225,252,255,276,276,300,309,333,351,375);
document.Horse_Time[0][0].values[0].prop="left";
document.Horse_Time[0][0].values[1]=new Array();
document.Horse_Time[0][0].values[0].prop2="style";
document.Horse_Time[0][1]=new String("sprite");
document.Horse_Time[0][1].obj=document.all ? document.all["h2"] : null;
document.Horse_Time[0][1].keyFrames=new Array(1,30);
document.Horse_Time[0][1].values=new Array(2);
document.Horse_Time[0][1].values[0]=new Array(0,21,39,51,75,99,120,141,147,168,174,174,183,186,198,207,234,258,273,288,294,300,300,327,354,360,378,402,414,417,432);
document.Horse_Time[0][1].values[0].prop="left";
document.Horse_Time[0][1].values[1]=new Array();
document.Horse_Time[0][1].values[0].prop2="style";
document.Horse_Time[0][2]=new String("sprite");
document.Horse_Time[0][2].obj=document.all ? document.all["h3"] : null;
document.Horse_Time[0][2].keyFrames=new Array(1,30);
document.Horse_Time[0][2].values=new Array(2);
document.Horse_Time[0][2].values[0]=new Array(0,0,12,33,45,72,93,108,117,129,150,162,165,177,183,189,207,219,231,240,252,261,285,297,315,315,327,351,378,399,423);
document.Horse_Time[0][2].values[0].prop="left";
document.Horse_Time[0][2].values[1]=new Array();
document.Horse_Time[0][2].values[0].prop2="style";
document.Horse_Time[0][3]=new String("sprite");
document.Horse_Time[0][3].obj=document.all ? document.all["h4"] : null;
document.Horse_Time[0][3].keyFrames=new Array(1,30);
document.Horse_Time[0][3].values=new Array(2);
document.Horse_Time[0][3].values[0]=new Array(0,27,51,51,69,75,78,78,102,129,132,144,150,168,177,198,213,225,240,258,279,300,318,327,348,354,357,381,405,411,417);
document.Horse_Time[0][3].values[0].prop="left";
document.Horse_Time[0][3].values[1]=new Array();
document.Horse_Time[0][3].values[0].prop2="style";
document.Horse_Time[0][4]=new String("sprite");
document.Horse_Time[0][4].obj=document.all ? document.all["h5"] : null;
document.Horse_Time[0][4].keyFrames=new Array(1,30);
document.Horse_Time[0][4].values=new Array(2);
document.Horse_Time[0][4].values[0]=new Array(0,27,42,66,81,99,126,144,171,180,192,195,213,240,267,279,303,318,330,339,366,375,387,402,408,414,438,450,477,504,513);
document.Horse_Time[0][4].values[0].prop="left";
document.Horse_Time[0][4].values[1]=new Array();
document.Horse_Time[0][4].values[0].prop2="style";
document.Horse_Time[0][5]=new String("sprite");
document.Horse_Time[0][5].obj=document.all ? document.all["h6"] : null;
document.Horse_Time[0][5].keyFrames=new Array(1,30);
document.Horse_Time[0][5].values=new Array(2);
document.Horse_Time[0][5].values[0]=new Array(0,15,39,48,63,72,75,84,111,138,156,183,207,222,225,249,252,264,276,297,300,303,321,327,348,369,387,402,405,417,426);
document.Horse_Time[0][5].values[0].prop="left";
document.Horse_Time[0][5].values[1]=new Array();
document.Horse_Time[0][5].values[0].prop2="style";
document.Horse_Time[0][6]=new String("sprite");
document.Horse_Time[0][6].obj=document.all ? document.all["h7"] : null;
document.Horse_Time[0][6].keyFrames=new Array(1,30);
document.Horse_Time[0][6].values=new Array(2);
document.Horse_Time[0][6].values[0]=new Array(0,18,45,45,57,57,60,63,66,84,108,120,147,174,189,207,216,240,261,276,294,294,297,312,327,348,360,378,381,402,429);
document.Horse_Time[0][6].values[0].prop="left";
document.Horse_Time[0][6].values[1]=new Array();
document.Horse_Time[0][6].values[0].prop2="style";
document.Horse_Time[0][7]=new String("sprite");
document.Horse_Time[0][7].obj=document.all ? document.all["h8"] : null;
document.Horse_Time[0][7].keyFrames=new Array(1,30);
document.Horse_Time[0][7].values=new Array(2);
document.Horse_Time[0][7].values[0]=new Array(0,9,24,24,24,39,45,54,63,81,90,90,111,117,117,135,153,156,156,183,195,210,228,237,255,255,261,282,282,294,306);
document.Horse_Time[0][7].values[0].prop="left";
document.Horse_Time[0][7].values[1]=new Array();
document.Horse_Time[0][7].values[0].prop2="style";
document.Horse_Time[0][8]=new String("sprite");
document.Horse_Time[0][9]=new String("sprite");
document.Horse_Time[0][9].obj = document.all ? document.all["sysMsg"] : null;
document.Horse_Time[0][9].keyFrames=new Array(1,30);
document.Horse_Time[0][9].values=new Array();
document.Horse_Time[0][9].values[0]=new Array();
document.Horse_Time[0][9].values[0].prop="left";
document.Horse_Time[0][9].values[1]=new Array();
document.Horse_Time[0][9].values[0]=new Array("hidden","inherit");
document.Horse_Time[0][9].values[0].prop="visibility";
document.Horse_Time[0][9].values[0].prop2="style";
for(i=0;i<document.Horse_Time.length;i++){document.Horse_Time[i].curFrame=0;document.Horse_Time[i].delay=200;}
}
</script>
</head>
<body onLoad="Horse_timelinePlay('horse')" bgcolor=#F7F7F7 bgcolor=#ffffff alink=#333333 vlink=#333333 link=#333333 topmargin=0 leftmargin=0>
<div id=h1 style=position:absolute;top:50px><img src=http://lnx.cinaitalia.net/non-cgi/race/h1.gif></div>
<div id=h2 style=position:absolute;top:90px><img src=http://lnx.cinaitalia.net/non-cgi/race/h2.gif></div>
<div id=h3 style=position:absolute;top:130px><img src=http://lnx.cinaitalia.net/non-cgi/race/h3.gif></div>
<div id=h4 style=position:absolute;top:170px><img src=http://lnx.cinaitalia.net/non-cgi/race/h4.gif></div>
<div id=h5 style=position:absolute;top:210px><img src=http://lnx.cinaitalia.net/non-cgi/race/h5.gif></div>
<div id=h6 style=position:absolute;top:250px><img src=http://lnx.cinaitalia.net/non-cgi/race/h6.gif></div>
<div id=h7 style=position:absolute;top:290px><img src=http://lnx.cinaitalia.net/non-cgi/race/h7.gif></div>
<div id=h8 style=position:absolute;top:330px><img src=http://lnx.cinaitalia.net/non-cgi/race/h8.gif></div>
<table width="100%" border=0 cellspacing=1 cellpadding=5 bgcolor=#4D86C0><tr bgcolor=FFFFFF align=right>
<td height=39 bgcolor=#F7F7F7 width=15>1</td><td width=498 bgcolor=#F7F7F7></td><td bgcolor=#F7F7F7>艾基脑</td></tr><tr bgcolor=FFFFFF align=right>
<td height=39 bgcolor=#F7F7F7>2</td><td bgcolor=#F7F7F7></td><td bgcolor=#F7F7F7>赤白尾</td></tr><tr bgcolor=FFFFFF align=right>
<td height=39 bgcolor=#F7F7F7>3</td><td bgcolor=#F7F7F7></td><td bgcolor=#F7F7F7>马虎</td></tr><tr bgcolor=FFFFFF align=right>
<td height=39 bgcolor=#F7F7F7>4</td><td bgcolor=#F7F7F7></td><td bgcolor=#F7F7F7>雅玛侠</td></tr><tr bgcolor=FFFFFF align=right>
<td height=39 bgcolor=#F7F7F7>5</td><td bgcolor=#F7F7F7></td><td bgcolor=#F7F7F7>雷电</td></tr><tr bgcolor=FFFFFF align=right>
<td height=39 bgcolor=#F7F7F7>6</td><td bgcolor=#F7F7F7></td><td bgcolor=#F7F7F7>蒙面超人</td></tr><tr bgcolor=FFFFFF align=right>
<td height=39 bgcolor=#F7F7F7>7</td><td bgcolor=#F7F7F7></td><td bgcolor=#F7F7F7>MASAKI</td></tr><tr bgcolor=FFFFFF align=right>
<td height=39 bgcolor=#F7F7F7>8</td><td bgcolor=#F7F7F7></td><td bgcolor=#F7F7F7>极度凶兽</td>
</tr>
</table>
</center>
</body></html>
请问大虾们谁知道这个游戏是怎么计算那号马赢~~~
谢谢了。。
<html><head>
<title>赛马实况</title>
<style>
A:visited{TEXT-DECORATION: none}
A:active{TEXT-DECORATION: none}
A:hover{TEXT-DECORATION: none}
A:link{text-decoration: none;}
.t{LINE-HEIGHT: 1.4}
BODY{FONT-FAMILY: georgia, Verdana; FONT-SIZE: 9pt;
background-position: center;
scrollbar-highlight-color: #ffffff;
scrollbar-shadow-color: #FFFFFF;
scrollbar-arrow-color: #FFFFFF;
scrollbar-base-color: #4D86C0;
scrollbar-darkshadow-color: #4D86C0;
scrollbar-track-color: #FFFFFF;
}
TD,DIV{FONT-FAMILY: georgia, Verdana; FONT-SIZE: 9pt}
</style>
<script>
function Horse_timelinePlay(tmLnName, myID) {
if (document.Horse_Time == null) Horse_initTimelines();
tmLn = document.Horse_Time[tmLnName];
if(myID == null) { myID = ++tmLn.ID; firstTime=true;}
setTimeout('Horse_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);
fNew = ++tmLn.curFrame;
for (i=0; i<tmLn.length; i++) {
sprite = tmLn[i];
if (sprite.obj) {
numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {
keyFrm=1;
for (j=0; j<sprite.values.length; j++) {
props = sprite.values[j];
if (numKeyFr != props.length) {
if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];
else sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];
}else{
while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;
if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];
else sprite.obj[props.prop2][props.prop] = props[keyFrm-1];
}}}}
}}
}
function Horse_initTimelines() {
document.Horse_Time = new Array();
document.Horse_Time[0] = new Array();
document.Horse_Time["horse"] = document.Horse_Time[0];
document.Horse_Time[0][0]=new String("sprite");
document.Horse_Time[0][0].obj=document.all ? document.all["h1"] : null;
document.Horse_Time[0][0].keyFrames=new Array(1,30);
document.Horse_Time[0][0].values=new Array(2);
document.Horse_Time[0][0].values[0]=new Array(0,24,24,24,45,57,78,105,111,120,126,129,138,153,156,162,180,204,207,219,222,225,252,255,276,276,300,309,333,351,375);
document.Horse_Time[0][0].values[0].prop="left";
document.Horse_Time[0][0].values[1]=new Array();
document.Horse_Time[0][0].values[0].prop2="style";
document.Horse_Time[0][1]=new String("sprite");
document.Horse_Time[0][1].obj=document.all ? document.all["h2"] : null;
document.Horse_Time[0][1].keyFrames=new Array(1,30);
document.Horse_Time[0][1].values=new Array(2);
document.Horse_Time[0][1].values[0]=new Array(0,21,39,51,75,99,120,141,147,168,174,174,183,186,198,207,234,258,273,288,294,300,300,327,354,360,378,402,414,417,432);
document.Horse_Time[0][1].values[0].prop="left";
document.Horse_Time[0][1].values[1]=new Array();
document.Horse_Time[0][1].values[0].prop2="style";
document.Horse_Time[0][2]=new String("sprite");
document.Horse_Time[0][2].obj=document.all ? document.all["h3"] : null;
document.Horse_Time[0][2].keyFrames=new Array(1,30);
document.Horse_Time[0][2].values=new Array(2);
document.Horse_Time[0][2].values[0]=new Array(0,0,12,33,45,72,93,108,117,129,150,162,165,177,183,189,207,219,231,240,252,261,285,297,315,315,327,351,378,399,423);
document.Horse_Time[0][2].values[0].prop="left";
document.Horse_Time[0][2].values[1]=new Array();
document.Horse_Time[0][2].values[0].prop2="style";
document.Horse_Time[0][3]=new String("sprite");
document.Horse_Time[0][3].obj=document.all ? document.all["h4"] : null;
document.Horse_Time[0][3].keyFrames=new Array(1,30);
document.Horse_Time[0][3].values=new Array(2);
document.Horse_Time[0][3].values[0]=new Array(0,27,51,51,69,75,78,78,102,129,132,144,150,168,177,198,213,225,240,258,279,300,318,327,348,354,357,381,405,411,417);
document.Horse_Time[0][3].values[0].prop="left";
document.Horse_Time[0][3].values[1]=new Array();
document.Horse_Time[0][3].values[0].prop2="style";
document.Horse_Time[0][4]=new String("sprite");
document.Horse_Time[0][4].obj=document.all ? document.all["h5"] : null;
document.Horse_Time[0][4].keyFrames=new Array(1,30);
document.Horse_Time[0][4].values=new Array(2);
document.Horse_Time[0][4].values[0]=new Array(0,27,42,66,81,99,126,144,171,180,192,195,213,240,267,279,303,318,330,339,366,375,387,402,408,414,438,450,477,504,513);
document.Horse_Time[0][4].values[0].prop="left";
document.Horse_Time[0][4].values[1]=new Array();
document.Horse_Time[0][4].values[0].prop2="style";
document.Horse_Time[0][5]=new String("sprite");
document.Horse_Time[0][5].obj=document.all ? document.all["h6"] : null;
document.Horse_Time[0][5].keyFrames=new Array(1,30);
document.Horse_Time[0][5].values=new Array(2);
document.Horse_Time[0][5].values[0]=new Array(0,15,39,48,63,72,75,84,111,138,156,183,207,222,225,249,252,264,276,297,300,303,321,327,348,369,387,402,405,417,426);
document.Horse_Time[0][5].values[0].prop="left";
document.Horse_Time[0][5].values[1]=new Array();
document.Horse_Time[0][5].values[0].prop2="style";
document.Horse_Time[0][6]=new String("sprite");
document.Horse_Time[0][6].obj=document.all ? document.all["h7"] : null;
document.Horse_Time[0][6].keyFrames=new Array(1,30);
document.Horse_Time[0][6].values=new Array(2);
document.Horse_Time[0][6].values[0]=new Array(0,18,45,45,57,57,60,63,66,84,108,120,147,174,189,207,216,240,261,276,294,294,297,312,327,348,360,378,381,402,429);
document.Horse_Time[0][6].values[0].prop="left";
document.Horse_Time[0][6].values[1]=new Array();
document.Horse_Time[0][6].values[0].prop2="style";
document.Horse_Time[0][7]=new String("sprite");
document.Horse_Time[0][7].obj=document.all ? document.all["h8"] : null;
document.Horse_Time[0][7].keyFrames=new Array(1,30);
document.Horse_Time[0][7].values=new Array(2);
document.Horse_Time[0][7].values[0]=new Array(0,9,24,24,24,39,45,54,63,81,90,90,111,117,117,135,153,156,156,183,195,210,228,237,255,255,261,282,282,294,306);
document.Horse_Time[0][7].values[0].prop="left";
document.Horse_Time[0][7].values[1]=new Array();
document.Horse_Time[0][7].values[0].prop2="style";
document.Horse_Time[0][8]=new String("sprite");
document.Horse_Time[0][9]=new String("sprite");
document.Horse_Time[0][9].obj = document.all ? document.all["sysMsg"] : null;
document.Horse_Time[0][9].keyFrames=new Array(1,30);
document.Horse_Time[0][9].values=new Array();
document.Horse_Time[0][9].values[0]=new Array();
document.Horse_Time[0][9].values[0].prop="left";
document.Horse_Time[0][9].values[1]=new Array();
document.Horse_Time[0][9].values[0]=new Array("hidden","inherit");
document.Horse_Time[0][9].values[0].prop="visibility";
document.Horse_Time[0][9].values[0].prop2="style";
for(i=0;i<document.Horse_Time.length;i++){document.Horse_Time[i].curFrame=0;document.Horse_Time[i].delay=200;}
}
</script>
</head>
<body onLoad="Horse_timelinePlay('horse')" bgcolor=#F7F7F7 bgcolor=#ffffff alink=#333333 vlink=#333333 link=#333333 topmargin=0 leftmargin=0>
<div id=h1 style=position:absolute;top:50px><img src=http://lnx.cinaitalia.net/non-cgi/race/h1.gif></div>
<div id=h2 style=position:absolute;top:90px><img src=http://lnx.cinaitalia.net/non-cgi/race/h2.gif></div>
<div id=h3 style=position:absolute;top:130px><img src=http://lnx.cinaitalia.net/non-cgi/race/h3.gif></div>
<div id=h4 style=position:absolute;top:170px><img src=http://lnx.cinaitalia.net/non-cgi/race/h4.gif></div>
<div id=h5 style=position:absolute;top:210px><img src=http://lnx.cinaitalia.net/non-cgi/race/h5.gif></div>
<div id=h6 style=position:absolute;top:250px><img src=http://lnx.cinaitalia.net/non-cgi/race/h6.gif></div>
<div id=h7 style=position:absolute;top:290px><img src=http://lnx.cinaitalia.net/non-cgi/race/h7.gif></div>
<div id=h8 style=position:absolute;top:330px><img src=http://lnx.cinaitalia.net/non-cgi/race/h8.gif></div>
<table width="100%" border=0 cellspacing=1 cellpadding=5 bgcolor=#4D86C0><tr bgcolor=FFFFFF align=right>
<td height=39 bgcolor=#F7F7F7 width=15>1</td><td width=498 bgcolor=#F7F7F7></td><td bgcolor=#F7F7F7>艾基脑</td></tr><tr bgcolor=FFFFFF align=right>
<td height=39 bgcolor=#F7F7F7>2</td><td bgcolor=#F7F7F7></td><td bgcolor=#F7F7F7>赤白尾</td></tr><tr bgcolor=FFFFFF align=right>
<td height=39 bgcolor=#F7F7F7>3</td><td bgcolor=#F7F7F7></td><td bgcolor=#F7F7F7>马虎</td></tr><tr bgcolor=FFFFFF align=right>
<td height=39 bgcolor=#F7F7F7>4</td><td bgcolor=#F7F7F7></td><td bgcolor=#F7F7F7>雅玛侠</td></tr><tr bgcolor=FFFFFF align=right>
<td height=39 bgcolor=#F7F7F7>5</td><td bgcolor=#F7F7F7></td><td bgcolor=#F7F7F7>雷电</td></tr><tr bgcolor=FFFFFF align=right>
<td height=39 bgcolor=#F7F7F7>6</td><td bgcolor=#F7F7F7></td><td bgcolor=#F7F7F7>蒙面超人</td></tr><tr bgcolor=FFFFFF align=right>
<td height=39 bgcolor=#F7F7F7>7</td><td bgcolor=#F7F7F7></td><td bgcolor=#F7F7F7>MASAKI</td></tr><tr bgcolor=FFFFFF align=right>
<td height=39 bgcolor=#F7F7F7>8</td><td bgcolor=#F7F7F7></td><td bgcolor=#F7F7F7>极度凶兽</td>
</tr>
</table>
</center>
</body></html>