Help!how to animate a line from one pt. to one pt. (MX)?

Something like this?

point1={x:100,y:100};
point2={x:400,y:400};
diffx=point2.x-point1.x;
diffy=point2.y-point1.y;

steps=100;
currentPoint=point1;
this.lineStyle(0,0,100);
this.moveTo(currentPoint.x,currentPoint.y);
i=1;
this.onEnterFrame=function(){
	if (i<=steps){
		currentPoint.x+=diffx/steps;
		currentPoint.y+=diffy/steps;
		this.lineTo(currentPoint.x,currentPoint.y);
		i++;
	} else delete this.onEnterFrame;
}

pom :moustache