A modification.

code:


man_mc.stop();

// Use tx,ty to keep track of desired location
man_mc.tx = man_mc._x;
man_mc.ty = man_mc._y;
man_mc.walkSpeed = .2;

man_mc.onMouseDown = function()
{
// dx,dy are the position of the mouse relative to the center of the man
this.tx = _root._xmouse;
this.ty = _root._ymouse;
var dx = this._xmouse;
var dy = this._ymouse;

// get the angle of the mouse
angle = Math.atan2(dy,dx);
// convert to a frame number (1-8)
frameNbr = Math.round(8+4*angle/Math.PI) % 8 + 1;
this.gotoAndStop(frameNbr);
// trace(angle + ", " + frameNbr);
}

man_mc.onEnterFrame = function()
{
this._x += (this.tx - this._x)*this.walkSpeed;
this._y += (this.ty - this._y)*this.walkSpeed;
}