Button movement with inertia

how could i modify this script so that it has inertia, and so that i can movie diagonally? is there a better way of doing mc movement with keypresses?

on (keyPress “<Left>”) {
currentX = this._x;
this._x = currentX - 2;
_root.bug._rotation = 270;
}
on (keyPress “<Right>”) {
currentX = this._x;
this._x = currentX + 2;
_root.bug._rotation = 90;
}
on (keyPress “<Up>”) {
currentY = this._y;
this._y = currentY - 2;
_root.bug._rotation = 360;
}
on (keyPress “<Down>”) {
currentY = this._y;
this._y = currentY + 2;
_root.bug._rotation = 180;
}

thanks
:}