float.inc
上传用户:angela
上传日期:2022-05-11
资源大小:853k
文件大小:3k
源码类别:

外挂编程

开发平台:

ASP/ASPX

  1. var yuxingbrOK=false;
  2. var mie=false;
  3. var aver=parseInt(navigator.appVersion.substring(0,1));
  4. var aname=navigator.appName;
  5. var yuxingmystop=0;
  6. function yuxingcheckbrOK()
  7. {if(aname.indexOf("Internet Explorer")!=-1)
  8. {if(aver>=4) yuxingbrOK=navigator.javaEnabled();
  9. mie=true;
  10. }
  11. if(aname.indexOf("Netscape")!=-1)  
  12. {if(aver>=4) yuxingbrOK=navigator.javaEnabled();}
  13. }
  14. var vmin=2;
  15. var vmax=5;
  16. var vr=2;
  17. var timer1;
  18. function yuxingchip(chipname,width,height)
  19. {
  20. this.named=chipname;
  21. this.vx=vmin+vmax*Math.random();
  22. this.vy=vmin+vmax*Math.random();
  23. this.w=width;
  24. this.h=height;
  25. this.xx=0;
  26. this.yy=0;
  27. this.timer1=null;
  28. }
  29. function yuxingmovechip(chipname)
  30. {
  31. if(yuxingbrOK && yuxingmystop==0)
  32. {eval("yuxingchip="+chipname);
  33. if(!mie)
  34. {pageX=window.pageXOffset;
  35. pageW=window.innerWidth;
  36. pageY=window.pageYOffset;
  37. pageH=window.innerHeight;
  38. }
  39. else
  40. {pageX=window.document.body.scrollLeft;
  41. pageW=window.document.body.offsetWidth-8;
  42. pageY=window.document.body.scrollTop;
  43. pageH=window.document.body.offsetHeight;
  44. yuxingchip.xx=yuxingchip.xx+yuxingchip.vx;
  45. yuxingchip.yy=yuxingchip.yy+yuxingchip.vy;
  46. yuxingchip.vx+=vr*(Math.random()-0.5);
  47. yuxingchip.vy+=vr*(Math.random()-0.5);
  48. if(yuxingchip.vx>(vmax+vmin))  yuxingchip.vx=(vmax+vmin)*2-yuxingchip.vx;
  49. if(yuxingchip.vx<(-vmax-vmin)) yuxingchip.vx=(-vmax-vmin)*2-yuxingchip.vx;
  50. if(yuxingchip.vy>(vmax+vmin))  yuxingchip.vy=(vmax+vmin)*2-yuxingchip.vy;
  51. if(yuxingchip.vy<(-vmax-vmin)) yuxingchip.vy=(-vmax-vmin)*2-yuxingchip.vy;
  52. if(yuxingchip.xx<=pageX)
  53. {yuxingchip.xx=pageX;
  54. yuxingchip.vx=vmin+vmax*Math.random();
  55. }
  56. if(yuxingchip.xx>=pageX+pageW-yuxingchip.w)
  57. {yuxingchip.xx=pageX+pageW-yuxingchip.w;
  58. yuxingchip.vx=-vmin-vmax*Math.random();
  59. }
  60. if(yuxingchip.yy<=pageY)
  61. {yuxingchip.yy=pageY;
  62. yuxingchip.vy=vmin+vmax*Math.random();
  63. }
  64. if(yuxingchip.yy>=pageY+pageH-yuxingchip.h)
  65. {yuxingchip.yy=pageY+pageH-yuxingchip.h;
  66. yuxingchip.vy=-vmin-vmax*Math.random();
  67. }
  68. if(!mie)
  69. {eval('document.'+yuxingchip.named+'.top ='+yuxingchip.yy);
  70. eval('document.'+yuxingchip.named+'.left='+yuxingchip.xx);
  71. else
  72. {eval('document.all.'+yuxingchip.named+'.style.pixelLeft='+yuxingchip.xx);
  73. eval('document.all.'+yuxingchip.named+'.style.pixelTop ='+yuxingchip.yy); 
  74. }
  75. yuxingchip.timer1=setTimeout("yuxingmovechip('"+yuxingchip.named+"')",100);
  76. }
  77. }
  78. function yuxingstop(x)
  79. {
  80. yuxingbrOK=true;
  81. yuxingmystop=x;
  82. yuxingmovechip("yuxingtome");
  83. }
  84. var yuxingtome;
  85. var yuxingchip;
  86. function yuxingtome()
  87. {yuxingcheckbrOK(); 
  88. yuxingtome=new yuxingchip("yuxingtome",80,80);
  89. if(yuxingbrOK) 
  90. { yuxingmovechip("yuxingtome");
  91. }
  92. }
  93. ns4=(document.layers)?true:false;
  94. ie4=(document.all)?true:false;
  95. function yuxingover()
  96. {
  97. if(ns4){
  98. //document.yuxing.left=window.innerWidth/2-400;
  99. eval('document.yuxing.left=document.'+yuxingchip.named+'.left');
  100. eval('document.yuxing.top=document.'+yuxingchip.named+'.top-15');
  101. document.yuxing.visibility="show";
  102. }else if(ie4) 
  103. {
  104. //document.all.yuxing.style.left=window.document.body.offsetWidth/2-400;
  105. document.all.yuxing.style.left=parseInt(document.all.yuxingtome.style.left);
  106. document.all.yuxing.style.top=parseInt(document.all.yuxingtome.style.top)+80;
  107. document.all.yuxing.style.visibility="visible";
  108. yuxingstop(1);
  109. }
  110. }
  111. function yuxingout()
  112. {
  113. if(ns4){
  114. document.yuxing.visibility="hide";
  115. }else if(ie4) 
  116. {
  117. document.all.yuxing.style.visibility="hidden";
  118. yuxingstop(0);
  119. }
  120. }
  121. document.writeln("<div id='yuxingtome' style='position:absolute;'>{$FloatCode}</div>");
  122. yuxingtome()