Easing with AS not quite working

Folks,

Any of you able to check my code. I’ve got a map with movement controls and my left/right easing not quite working correctly,


move_left.onRelease = function() {
	endXpos = map._x + 20;
}
move_right.onRelease = function() {
	endXpos = map._x - 20;
}
map.onEnterFrame = function(){
	map._x = (endXpos-map._x)/speed;
}

Help as ever appreciated

Munki