PHP+Javascript模拟Matrix画面
时间:2008-05-17 来源:剑心通明
直接存为*.php文件运行即可。
The Matrix
// *****************************************************************
// Written By Caocao
// [email protected]
// http://caocao.oso.com.cn
// *****************************************************************
number_h=;
number_w=;
step=5;
text=new Array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
grad=new Array("#000000","#004000","#008000","#00C000","#00FF00");
function line()
{
this.start=100;
this.end=60;
this.restart=0;
}
function randchar()
{
return (text[Math.round(Math.random()*25)]);
}
function initial()
{
matrix=new Array();
light=new Array();
for (i=0;i";
}
}
for (j=0;j0)
{
return (light[j].start-i);
}
if ((i-light[j].end)0)
{
return (i-light[j].end);
}
if ((i-light[j].end)>4&&(light[j].start-i)>4)
{
return (4);
}
return (0);
}
function display()
{
for (i=0;i"+randchar()+"";
}
}
}
function show()
{
new_light();
display();
setTimeout("show()",);
}
-->
";
echo "";
for ($i=0;$i";
for ($j=0;$jM";
}
echo "";
}
echo "";
?>
initial();
show();
相关阅读 更多 +