Full version: jsB@nk » Pointer » Trailer » CelebrityQuiz: dynamic guessing game with flying image
URL: https://www.javascriptbank.com/celebrityquiz-dynamic-guessing-game-with-flying-image.html
Are you looking for a new and fastloading way to entertain your visitors? In that case this floating starquiz does the job. Only one picture is requested. Very easy to configure.
Full version: jsB@nk » Pointer » Trailer » CelebrityQuiz: dynamic guessing game with flying image
URL: https://www.javascriptbank.com/celebrityquiz-dynamic-guessing-game-with-flying-image.html
<SCRIPT><!-- Beginning of JavaScript -// width and height of your imagevar imgwidth=235var imgheight=246// number of slices the image is cutvar imgslices=12// URL of your imagevar imgurl="../image/logojs.gif"var width_slice=Math.ceil(imgwidth/imgslices)var cliptop=0var clipbottom=imgheightvar clipleft=0var clipright=width_slicevar postop=0var thispos=0var x,yvar flag=0var boxfunction handlerMM(e){x = event.clientXy = event.clientYflag=1}if (document.all) {document.onmousemove = handlerMM;}var xpos=new Array()for (i=0;i<=imgslices;i++) {xpos[i]=-imgwidth}var ypos=new Array()for (i=0;i<=imgslices;i++) {ypos[i]=-imgheight}function initiateworm() {if (document.all) {makeworm()}}function makeworm() {if (flag==1) { for (i=imgslices; i>=0; i--) {thispos=width_slice xpos[i]=xpos[i-1]-thisposypos[i]=ypos[i-1] }xpos[0]=xypos[0]=ythispos=0for (i=0; i<imgslices; i++) { var thisspan = eval("document.all.span"+(i)+".style") thisspan.posLeft=xpos[i]thisspan.posTop=ypos[i] }}var timer=setTimeout("makeworm()",10)}document.write('<body bgcolor=#000000 onLoad=initiateworm()>')for (i=0;i<=imgslices-1;i++) { document.write("<span id='span"+i+"' style='position:absolute;visibility:visible;left:"+(-imgheight)+"px;clip:rect("+cliptop+"px "+clipright+"px "+clipbottom+"px "+clipleft+"px)'>")document.write("<img src="+imgurl+">") document.write("</span>")clipleft+=width_sliceclipright+=width_slice}// - End of JavaScript - --></SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->