Coordinates won't refresh in WHILE loop

Let me explain this first. All my program does is move a bug from the startpoint (antX,antY) to a given endpoint (endX,endY). DiffX is used to “animate” the bugs movement, since it is supposed to draw the bug’s position on the screen in the WHILE loop (while the bug isn’t too close to the endpoint).

My problem is the bolded code below. I want for the bug to move to a temporary spot in the direction of the endpoint and then pause for a little bit (slowDown()) to simulate the animation. Unfortunately, it doesn’t work for the WHILE loop.

Does anyone have any ideas? Or do I need to explain it better?
Thanks ~Matt

//---------------------------------------------

function moveMe(antX, antY, endX, endY, hyp)
{
goal = 1;
speed = 20;

while(goal > 0)
{
	if(endX > antX) diffX = (endX - antX) * (speed / hyp);
	else diffX = (antX - endX) * (speed / hyp);
	if(endY > antY) diffY = (endY - antY) * (speed / hyp);
	else diffY = (antY - endY) * (speed / hyp);
	
	//DETERMINE WHAT DIRECTION (X,Y) TO MOVE
	if(endX < antX) antX -= diffX;
	if(endX > antX) antX += diffX;
	if(endY < antY) antY -= diffY;
	if(endY > antY) antY += diffY;

** this._x = antX;
this._y = antY;
slowDown();**

	//MAKE SURE THE WHILE LOOP STOPS EVENTUALLY
	if(Math.abs(endX - antX) < 10) goal = 0;
	if(Math.abs(endY - antY) < 10) goal = 0;
}

}

function slowDown()
{
this.go = getTimer();
this.no = getTimer();
while(go + 30 > no) this.no = getTimer();
}