var lineStartX=10;
var lineStartY=10;
var lineEndX=450;
var lineEndY=300;
this.lineStyle(5, 0xFF00FF, 100);
this.moveTo(lineStartX, lineStartY);
this.lineTo(lineEndX, lineEndY);
var ratio=(lineEndY-lineStartY)/(lineEndX-lineStartX);
for (var yV:Number=0; yV<=lineEndY-lineStartY; yV+=5) {
var xV=yV/ratio+lineStartX;
//Vizualize//
this.lineStyle(2, 0xFFF0F0, 100);
this.moveTo(xV, yV+lineStartY);
this.lineTo(xV+1, yV+lineStartY+1);
}
for (var xV:Number=0; xV<=lineEndX-lineStartX; xV+=5) {
var yV=xV*ratio+lineStartY;
}