Mouse Trail Clock 2 | JavaScriptSource

Mouse Trail Clock 2

Amy Cook Jun 20, 2002
Just a neat little trick, a display of date/time around the mouse pointer
Check out the clock

The JavaScript Source: Time and Date: Mouse Trail Clock

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). The script is yours!!!

    

Did you use this script?  Do you like this site?  Please link to us!

Leave a Response

(
5 comments)

i have tried on my simple html page with javascrip but it is not working.....example is below..... hi [removed] [removed] dCol='000000';//date colour. fCol='000000';//face colour. sCol='000000';//seconds colour. mCol='000000';//minutes colour. hCol='000000';//hours colour. ClockHeight=40; ClockWidth=40; ClockFromMouseY=0; ClockFromMouseX=100; //Alter nothing below! Alignments will be lost! d=new Array("SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY"); m=new Array("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER"); date=new Date(); day=date.getDate(); year=date.getYear(); if (year "; props2=""; Split=360/n; Dsplit=360/D.length; HandHeight=ClockHeight/4.5 HandWidth=ClockWidth/4.5 HandY=-7; HandX=-2.5; scrll=0; step=0.06; currStep=0; y=new Array();x=new Array();Y=new Array();X=new Array(); for (i=0; i '+props2+D[i]+''); for (i=0; i '+props+Face[i]+''); for (i=0; i '+S[i]+''); for (i=0; i '+M[i]+''); for (i=0; i '+H[i]+''); } if (ie){ [removed]('div style="position:relative"'); for (i=0; i '+props2+D[i]+''); [removed](''); [removed]('div style="position:relative"'); for (i=0; i '+props+Face[i]+''); [removed](''); [removed]('div style="position:relative"'); for (i=0; i '+H[i]+''); [removed](''); [removed]('div style="position:relative"'); for (i=0; i '+M[i]+''); [removed]('') [removed]('div style="position:relative"'); for (i=0; i '+S[i]+''); [removed]('') } (ns)?window.captureEvents(Event.MOUSEMOVE):0; function Mouse(evnt){ ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY; xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX; } (ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse; function ClockAndAssign(){ time = new Date (); secs = time.getSeconds(); sec = -1.57 + Math.PI * secs/30; mins = time.getMinutes(); min = -1.57 + Math.PI * mins/30; hr = time.getHours(); hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360; if (ie){ Od.style.top=window.document.body.scrollTop; Of.style.top=window.document.body.scrollTop; Oh.style.top=window.document.body.scrollTop; Om.style.top=window.document.body.scrollTop; Os.style.top=window.document.body.scrollTop; } for (i=0; i Free JavaScripts provided by The JavaScript Source hi This is mouse trail

saurabh Nov 7, 2013

i have tried on my simple html page with javascrip but it is not working.....example is below..... hi [removed] [removed] dCol='000000';//date colour. fCol='000000';//face colour. sCol='000000';//seconds colour. mCol='000000';//minutes colour. hCol='000000';//hours colour. ClockHeight=40; ClockWidth=40; ClockFromMouseY=0; ClockFromMouseX=100; //Alter nothing below! Alignments will be lost! d=new Array("SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY"); m=new Array("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER"); date=new Date(); day=date.getDate(); year=date.getYear(); if (year "; props2=""; Split=360/n; Dsplit=360/D.length; HandHeight=ClockHeight/4.5 HandWidth=ClockWidth/4.5 HandY=-7; HandX=-2.5; scrll=0; step=0.06; currStep=0; y=new Array();x=new Array();Y=new Array();X=new Array(); for (i=0; i '+props2+D[i]+''); for (i=0; i '+props+Face[i]+''); for (i=0; i '+S[i]+''); for (i=0; i '+M[i]+''); for (i=0; i '+H[i]+''); } if (ie){ [removed]('div style="position:relative"'); for (i=0; i '+props2+D[i]+''); [removed](''); [removed]('div style="position:relative"'); for (i=0; i '+props+Face[i]+''); [removed](''); [removed]('div style="position:relative"'); for (i=0; i '+H[i]+''); [removed](''); [removed]('div style="position:relative"'); for (i=0; i '+M[i]+''); [removed]('') [removed]('div style="position:relative"'); for (i=0; i '+S[i]+''); [removed]('') } (ns)?window.captureEvents(Event.MOUSEMOVE):0; function Mouse(evnt){ ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY; xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX; } (ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse; function ClockAndAssign(){ time = new Date (); secs = time.getSeconds(); sec = -1.57 + Math.PI * secs/30; mins = time.getMinutes(); min = -1.57 + Math.PI * mins/30; hr = time.getHours(); hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360; if (ie){ Od.style.top=window.document.body.scrollTop; Of.style.top=window.document.body.scrollTop; Oh.style.top=window.document.body.scrollTop; Om.style.top=window.document.body.scrollTop; Os.style.top=window.document.body.scrollTop; } for (i=0; i Free JavaScripts provided by The JavaScript Source hi This is mouse trail

saurabh Nov 7, 2013

I tried it on myspace and it doesn't work...how can i make it work.[br /][br /]I copied it exactly how you have it.

shinji Apr 6, 2009

In order to answer you question, we would need to see your code, and how it is implemented. With that in mind, it is beyond the scope of these comments. You will need to post it over on [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]the JavaScript forum[/a]. Thanks!

Lee Jan 16, 2009

i've tryed the script but is not working. i insert it to the body section and still nothing. can you please help?[br /]thanks

jimmy smits Dec 7, 2008