Heat Seeking Cursor
An interesting and original cursor effect, again, the cursor and the effect are fully swishscripted.
REQUIRES MOUSE OVER
The Script
function DrawBox(sName,s,fc,bc,w,h,x,y,dpth,opc){
ref=_root.createEmptyMovieClip(sName,dpth);
ref.lineStyle(0,0xFFFFFF,0);
ref.moveTo(x,y);
ref.lineStyle(0,bc,opc);
ref.beginFill(fc,opc);
ref.lineTo(x+w,y);
ref.lineTo(x+w,y+h);
ref.lineTo(x,y+h);
ref.lineTo(x,y);
ref.endfill();
}
OnLoad() {
Mouse.hide();
i=100;
nSize=50;
nChange=nSize/i;
boxNames.length=i;
for (t=0;t<=i;t++) {
DrawBox("box"+[t],1,0xffffff,0x000000,nSize,nSize,0,0,t,10);
boxNames[t]="box"+[t];
nSize-=nChange;
}
}
OnEnterFrame(){
nSpeed=0.1;
for(t=0;t<=i;t++){
ref=this["box" + t];
ref._x -= _root._xmouse-(ref._width/2);
ref._x *= nSpeed;
ref._x += _root._xmouse-(ref._width/2);
ref._y -= _root._ymouse-(ref._height/2);
ref._y *= nSpeed;
ref._y += _root._ymouse+-(ref._height/2);
nSpeed+=((0.9/i)-0.001)
}
}