import flash.utils.Timer;
import flash.events.TimerEvent;
//fixed结束点
//sprite初始点
var fixedX:Number = fixed.x;
var fixedY:Number = fixed.y;
var speed:Number = 2;
var timer:Timer = new Timer(25);
var dx:Number = fixedX-sprite.x
var dy:Number = fixedY-sprite.y
var radian:Number = Math.atan2(dy,dx);
var num:Number =Math.sqrt(dy*dy+dx*dx)
var angel:Number = radian * 180/Math.PI;
trace(angel)
function timerFun(e:TimerEvent) {
sprite.x = sprite.x + speed * Math.cos(radian);
sprite.y = sprite.y + speed * Math.sin(radian);
}
timer.addEventListener(TimerEvent.TIMER,timerFun);
timer.start();