Acceleration?

Okay, i have this right now for movement on a shark MC i made:

[AS]

onClipEvent(enterFrame) {
if(key.isDown(key.RIGHT) and this._x < 400 ) {
this._x +=10;
this.gotoAndStop(1);
}
else if(key.isDown(key.RIGHT) and this._x >= 400) {
this._x = 50;
}
if(key.isDown(key.LEFT) and this._x > 0) {
this._x -= 10;
this.gotoAndStop(2);

}
else if(key.isDown(key.LEFT) and this._x &lt;= 0) {
	this._x = 350;
	
}
if(key.isDown(key.UP) and this._y &gt; 20) {
	this._y -= 10;
}
            if(key.isDown(Key.DOWN) and this._y &lt; 380) {
	this._y +=10;
}

}

[/AS]

how could i go about altering that, so that it would speed up/slow down gradually, opposed to just moving full speed right away? so that it looks more like a fish swimming in water…