Applying friction to movieclip

i have a movieclip that accelerates when you press the up button. when you let go of the up button the movieclip no longer accelerates but carries on at a constant speed. i am trying to add friction to the movieclip so it slows down when the up button is released. i have written this code -

private var friction:Number = 0.5;

stage.addEventListener(KeyboardEvent.KEY_UP, Stop);

private function Stop(evt:KeyboardEvent):void
{
if(evt.keyCode == Keyboard.UP){
xAcc = 0;
xVel *= friction;
}
}

but all this does it slow the movieclip down suddenly and makes it go at a slower constant speed. Can anyone help?