先在舞台上创建7个光标元件,实例名c1~c7,然后在第一帧填入下面代码:
var rate:Number=0.5;
var cursor:Array=[c1,c2,c3,c4,c5,c6,c7];
onEnterFrame=function(){
var c=cursor[0];
c.x+=(_xmouse-c.x)*rate;
c.y+=(_ymouse-c.y)*rate;
for(var i=1;i<7;++i){
c=cursor[i];
var destC=cursor[i-1];
c.x+=(destC.x-c.x)*rate;
c.y+=(destC.y-c.y)*rate;
}
}