The site is not published yet, but here is the code (it's from a guru's network tutorial):
<html>
<head>
<STYLE TYPE="text/css">
<!-- body { font-size:10px; color:#000000; font-family: verdana; }
b { font-size:10px; color:#000000; font-family: verdana; font-weight: bold;}
p { font-size:10px; color:#000000; font-family: verdana; }
br { font-size:10px; color:#000000; font-family: verdana; }
TD { font-size:10px; color:#000000; font-family: verdana;}
H1 { font-size:14px; color:#000000; font-family: verdana; }
H2 { font-size:12px; color:#000000; font-family: verdana; }
TH { font-size:12px; color:#000000; font-family: verdana; }
a{ text-decoration: none; color: #0000d9; }
a:visited{ text-decoration: none; color: #000000; }
a:hover{ text-decoration: none; color: #000000; background-color:#F0F0F8; }
//-->
</STYLE>
<script language="JavaScript">
var Xcursor=0
var Ycursor=0
if(document.layers)document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = handleMousemove
function handleMousemove(e){
Xcursor = (document.layers)?e.pageX:event.x
Ycursor = (document.layers)?e.pageY:event.y
}
function MovingObject(obj,img) {
if(this.NN=document.layers)this.obj=eval("document."+obj)
if(this.IE=document.all)this.obj=eval("document.all."+obj+".style")
this.img = (this.IE)?eval("document.all."+img):eval("document."+obj+".document."+img)
this.chase = Chase
}
function Chase( x, y ) {
dx=50+(this.IE)?x-this.obj.pixelLeft:x-this.obj.left
dy=50+(this.IE)?this.obj.pixelTop-y:this.obj.top-y
distance=Math.sqrt(dx*dx+dy*dy)/10
if(dx==0) angle=Math.PI*((dy>0)?.5:1.5)
else angle=Math.atan(dy/dx)+(Math.PI*((dx<0)?1
dy<0)?2:0))
xstep = distance*Math.cos(angle)
ystep = -distance*Math.sin(angle)
if( Math.abs(dx) >= 10 ) (this.IE)?this.obj.pixelLeft+=xstep:this.obj.left+=xstep
if( Math.abs(dy) >= 10 ) (this.IE)?this.obj.pixelTop+=ystep:this.obj.top+=ystep
this.img.src=chaserorb[Math.floor(180/15*angle/Math.PI)].src
}
function chaseCursor() {
s1.chase(Xcursor,Ycursor)
setTimeout("chaseCursor()", 35)
}
function initialize() {
chaserorb = new Array()
for(i=0; i<24; i++) {
chaserorb[i]=new Image
chaserorb[i].src="cursorchaser_orb"+i*15+".gif"
}
s1 = new MovingObject("chaserDiv","chaserorbimage")
chaseCursor()
}
onload=initialize
</script>
<style type='text/css'>
#chaserDiv { position:absolute; left:0px; top:0px; }
</style>
</head>
<body background="cursorchaser_grid.gif">
<table width=320 border=0 cellpadding=5 cellspacing=0 style="background-color: #999999"><tr><td><h2>Chaser Demo: Final version with Image Swapping</h2></td></tr></table>
<DIV ID="chaserDiv"><img src="cursorchaser_blank.gif" name="chaserorbimage" width=20 height=20 border=0 alt=""></DIV>
</body>
</html>
I just changed this line: chaserorb[i].src="cursorchaser_orb"+i*15+".gif"
into: chaserorb[i].src="animatedgif.gif"