Problem with making a car running after the mouse

I’m trying to make a car to drive toward the cursor. I have a problem that when the car runs toward the mouse, it starts shaking.

This is the code,
//create a click area
var area:Sprite = new Sprite();
area.buttonMode = true;
area.graphics.beginFill(0x000000, 0);
area.graphics.drawRect(0,0,stage.stageWidth, stage.stageHeight);
area.graphics.endFill();
area.addEventListener(MouseEvent.MOUSE_UP, upHandler);
area.addEventListener(MouseEvent.MOUSE_DOWN, downHandler);
addChild(area);
stage.addEventListener(Event.ENTER_FRAME, enterHandler);
function enterHandler(e:Event):void{
if(clicked){
run();
}else{
brake();
}
}

var clicked:Boolean;
function downHandler(e:MouseEvent):void{
clicked = true;
}
function upHandler(e:MouseEvent):void{
clicked = false;
}

//car variables
const maxsp:Number = 20;
const acce:Number =1;
var sp:Number = 0;
var spx:Number;
var spy:Number;
const anglesp:Number = 3;

function run():void {
var angle:Number = getangle(mouseX,mouseY,car.x,car.y)-car.rotation;
if ((angle <= 180 && angle >0) || (angle < -180)){
car.rotation += anglespsp/10;
} else {
car.rotation -= anglesp
sp/10;
}
if (sp < maxsp) {
sp += acce;
} else {
sp = maxsp;
}
spx = (-1)spMath.cos(car.rotation*(Math.PI/180));
spy = (-1)spMath.sin(car.rotation*(Math.PI/180));
car.x -= spx;
car.y -= spy;
}

function brake(): void {
sp = 0.9;
spx = (-1)spMath.cos(car.rotation
(Math.PI/180));
spy = (-1)spMath.sin(car.rotation*(Math.PI/180));
car.x -= spx;
car.y -= spy;
if (sp<0) {
sp = 0;
}
}

Any ideas to solve the problem? Thanks.