<script> <!-- var your_image="testimage86.gif" // speed var tempo=40 // average horizontal distance between the images var stepx=20 // average vertical distance between the images var stepy=20 // number of images var numberofimages=12 // do not edit the variables below var imgpreload=new Image() imgpreload.src=your_image var x,y var marginbottom var marginleft=0 var margintop=0 var marginright var timer var xpos=new Array() var ypos=new Array() var spancontent=new Array() for (i=0; i<=numberofimages;i++) { xpos[i]=0 ypos[i]=0 } for (i=0;i<=numberofimages;i++) { spancontent[i]="<img src='"+your_image+"'>" } function setValues() { var firsttimer= setTimeout("setValues2()",2000) } function setValues2() { if (document.all) { marginbottom=document.body.clientHeight-5 marginright=document.body.clientWidth-5 for (i=0;i<=numberofimages;i++) { var thisspan = eval("document.all.span"+i) thisspan.innerHTML=spancontent[i] var thisspan = eval("document.all.span"+(i)+".style") thisspan.posLeft=0 thisspan.postop=0 } moveball() }
if (document.layers) { marginbottom=window.innerHeight-5 marginright=window.innerWidth-5 for (i=0;i<=numberofimages;i++) { var thisspan=eval("document.span"+i+".document") thisspan.write(spancontent[i]) thisspan.close() var thisspan=eval("document.span"+i) thisspan.left=0 thisspan.top=0 } moveball() } } function randommaker(range) { rand=Math.floor(range*Math.random()) return rand } function moveball() { if (document.all) { checkposition() makesnake() document.all.span0.style.posTop+=stepy timer=setTimeout("moveball()",tempo) } if (document.layers) { checkposition() makesnake() document.span0.top+=stepy timer=setTimeout("moveball()",tempo) } } function makesnake() { for (i=numberofimages; i>=1; i--) { xpos[i]=xpos[i-1] ypos[i]=ypos[i-1] } if (document.all) { xpos[0]=document.all.span0.style.posLeft+stepx ypos[0]=document.all.span0.style.posTop+stepy
Скачать картинку для скрипта (1 КБ) http://wc3.game-s.ru/skripts/star86.rar