Moving target after event

Hi i am making a game where the user places a tile on a target, then the target needs to move across the stage ready for the next tile to be placed.
here is the code i am using:

var Xpos:Number;
var Ypos:Number;

heatLight_mc.onPress = function() {
Xpos = this._x;
Ypos = this._y;
heatLight_mc.onRelease = function() {

if (heatLight_mc.hitTest(target2_mc)) {

}else if (heatLight_mc.hitTest(target1_mc)) {

target1_mc.onEnterFrame = function() {
this._x += 2; //here is where i need to stop it at X coordinate??

heatLight_mc._x = Xpos;
heatLight_mc._y = Ypos;

This makes the target move across the stage, but I cannot get it to stop at a X coordinate.
can anyone help please, thanks