网页代码设计技巧系列之---弹子游戏.doc_第1页
网页代码设计技巧系列之---弹子游戏.doc_第2页
网页代码设计技巧系列之---弹子游戏.doc_第3页
网页代码设计技巧系列之---弹子游戏.doc_第4页
网页代码设计技巧系列之---弹子游戏.doc_第5页
已阅读5页,还剩71页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

= 40) blclr = 0;tim = 0;ballN = 3;with (Math) tmptim = floor(tim / 10);document.forms0.TM.value = tmptim;clrmes.style.posTop = -1000;clrmes.style.posLeft = -1000;ovrmes.style.posTop = -1000;ovrmes.style.posLeft = -1000;for (ib = 0; ib 5; ib+) for (ia = 0; ia 8; ia+) chc(ib * 8 + ia +1, ib);blstaib * 8 + ia = ib;document.forms0.BL.value = ballN;starter.style.posTop = -1000;starter.style.posLeft = -1000;gameFLG = 1;loadFLG = 1;ballX = 209;ballY = 270;ballDX =- 8;ballDY =- 8;tmpRL = 193;missFLG = 0;timerID = setTimeout(mainF(), INT);function SUP() UP.outerHTML = SPEED DOWN;DN.style.posTop = 170;DN.style.posLeft = 432;INT = 10;function SDN() DN.outerHTML = SPEED UP;UP.style.posTop = 170;UP.style.posLeft = 432;INT = 100;function MouseMv() if (loadFLG = 1) tmpRL = X - 20;if (tmpRL 370) tmpRL = 370; function outCHK() if (ballX 401) ballX = 802 - ballX; ballDX = -ballDX; if (ballY = 272) if (missFLG = 0) tmpX = (ballDX / ballDY) * (272 - ballY) + ballX;if (tmpX = tmpRL - 12) if (tmpX = tmpRL + 42) ballY = 272; ballDY = -ballDY;ballX = tmpX;ballRD = tmpX - tmpRL;with (Math) ballDX = 8 * abs(ballDX) / ballDX; if (ballRD 36) ballDX = 15; if (ballRD = 14) if (ballRD = 17) if (ballRD = 0) if (ballRD = 28) if (ballRD = -4) if (ballRD = 33) if (ballRD 0) missFLG = 1; else if (ballY 290) missFLG = 0; ballN = ballN - 1; gameEnd(); function blkCHK() tmpY = ballY + 4;tmpX = ballX + 4;if (tmpY = 48) if (tmpY = 29) if (tmpX = 396) with (Math) ia = floor(tmpX - 29) / 46);ib = floor(tmpY - 48) / 20);ic = ib * 8 + ia;if (blstaic = 40) gameEnd(); if (ballDX 0) iy=(ballDY / ballDX) * (29 + 46 * ia - tmpX) + tmpY;if (iy 48 + 20 * ib + 18) tmpY1 = 48 + 20 * ib + 18;tmpX1 = (ballDX / ballDY) * (48 + 20 * ib + 18 - tmpY) + tmpX;ballX = tmpX1 - 4;ballY = tmpY1 - 4;ballDY = -ballDY; else if (iy 48 + 20 * ib + 18) tmpY1 = 48 + 20 * ib + 18;tmpX1 = (ballDX / ballDY) * (48 + 20 * ib + 18 - tmpY) + tmpX;ballX = tmpX1 - 4;ballY = tmpY1 - 4;ballDY = -ballDY; else if (iy = 40) clrmes.style.posTop = 150;clrmes.style.posLeft = 160;if (ballN = 0) ovrmes.style.posTop = 150;ovrmes.style.posLeft = 160;blclr = 40;function onLD() bgIE.style.posTop = 16;bgIE.style.posLeft = 16;ball.style.posTop = 270;ball.style.posLeft = 209;racket.style.posTop = 280;racket.style.posLeft = 193;info.style.posTop = 16;info.style.posLeft = 432;starter.style.posTop = -1000;starter.style.posLeft = -1000;clrmes.style.posTop = -1000;clrmes.style.posLeft = -1000;ovrmes.style.posTop = -1000;ovrmes.style.posLeft = -1000;DN.style.posTop = 170;DN.style.posLeft = 432;for (ib = 0; ib 5; ib+) for (ia = 0; ia 8; ia+) blstaib * 8 + ia = ib;starter.style.posTop = 200;starter.style.posLeft = 180;function chc(bno,bcl) tmpbno = (bno PONGBall: Time: !- Beginwith (document) write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write();write(

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论