文件名称:冒泡--鼠标跟随不断冒泡
文件大小:2KB
文件格式:TXT
更新时间:2016-04-07 04:39:24
冒泡
鼠标跟随不断冒泡 Image0 = new Image(); Image0.src = "images/bubblack.gif"; Amount = 20; Ymouse = -50; Xmouse = -50; Ypos = new Array(); Xpos = new Array(); Speed = new Array(); rate = new Array(); grow = new Array(); Step = new Array(); Cstep = new Array(); nsSize = new Array(); ns = (document.layers)?1:0; (document.layers)?window.captureEvents(Event.MOUSEMOVE):0; function Mouse(evnt) { Ymouse=(document.layers)?evnt.pageY-20:event.y-20; Xmouse=(document.layers)?evnt.pageX:event.x; } (document.layers)?window.onMouseMove=Mouse:document.onmousemove=Mouse; for (i = 0; i < Amount; i++) { Ypos[i] = Ymouse; Xpos[i] = Xmouse; Speed[i] = Math.random()*4+1; Cstep[i] = 0; Step[i] = Math.random()*0.1+0.05; grow[i] = 8; nsSize[i] = Math.random()*15+5;