<script> <!-- Dit script en nog veel meer Javascripts zijn gratis te krijgen bij: --> <!-- Magic Motion Javascripts!!! http://www.magicmotion.com --> var marcel = 60; // de lengte van de slang var lemans = 20; // de grootte van de slang var ML140721381N050 = 6; // de afstand tussen de rondjes var kleur = "#9933FF"; //de kleur van de slang function slang() { var a=1; var text=""; document.body.innerHTML += "<span id='AAA' class='magic'></span>"; while(a<=marcel) { text +="<span id='magic"+a+"' style='{position:absolute; top:"+(-lemans)+"px; left:"+(-lemans)+"px; background-color:"+kleur+"; margin:0; height: "+lemans+"px; width: "+lemans+"px; filter:Alpha(style=2, opacity=30, finishopacity=0);}' class='magic"+a+"'></span>"; //<a href="http://www.magicmotion.com"> </a> function (y[i]) a++; } document.all["AAA"].innerHTML = text; lopen(); } document.onload = setTimeout("slang()",500); var x=-lemans,y=-lemans; function positie() { x = window.event.x + document.body.scrollLeft - lemans/2; y = window.event.y + document.body.scrollTop - lemans/2; } document.onmousemove = positie; var X=0,Y=0; function neue_koordinaten(x1,y1) { X = ML140721381N050 * Math.sin(Math.atan2(y-y1,x-x1)); Y = ML140721381N050 * Math.sin(Math.atan2(x-x1,y-y1)); } var b=marcel-1; var c=marcel; var d=marcel-Math.ceil(marcel/32*23); function lopen() { neue_koordinaten(document.all["magic"+d].style.pixelLeft,document.all["magic"+d].style.pixelTop); document.all["magic"+b].style.pixelTop = document.all["magic"+c].style.pixelTop + X; //<a href="http://www.magicmotion.com"> </a> function (y[i]) neue_koordinaten(document.all["magic"+d].style.pixelLeft,document.all["magic"+d].style.pixelTop); document.all["magic"+b].style.pixelLeft =document.all["magic"+c].style.pixelLeft + Y; b--; if(b<=0) b=marcel; c--; if(c<=0) c=marcel; d--; if(d<=0) d=marcel; setTimeout("lopen()",10); } // --> </script> |