Dynamic line drawing...setInterval

hi all…

i´m attempting to draw a line dynamically that takes points from a database array, which will draw over a certain time period rather than just appear too quickly that the eye doesn´t see it drawn. i´ve tried several permutations with the setInterval function but I´ve had no luck.

here´s the code i have that draws the line from the coordinates in the array…does anyone have any suggestions how i could make this happen?

thanks.

progressline ();

//based on totalmiles ™, finds the last element in the database array vtour to where the drawn line will stop
function progressline () {
if (tm >= vtour*[0] & tm < vtour [i+1][0]) {
determineline ();
} else {
i++;
progressline ();
}
}

function determineline () {
this._visible = false;
this.lineStyle (2, 0xFF6633);
this.moveTo (vtour[j][2], vtour[j][3]);
//draws line to coordinates in database, stopping at last entry
for (j=0; j <= i; j++) {
this.lineTo (vtour[j][2], vtour[j][3]);
}
//using geometry to dynamically find the coordinates to draw partial line if necessary
if (tm > vtour[j-1][0]) {
//set the percent if tm is located between points in database
var f:Number = (tm - vtour[j-1][0])/vtour[j-1][1];
//draw that line
this.lineTo ((f * (vtour[j][2]-vtour[j-1][2]) + vtour [j-1][2]), (f * (vtour[j][3]-vtour[j-1][3]) + vtour[j-1][3]));
return;
} else {
return;
}
}