Interactive Image Panning

Hi
I have a question about the Interactive Image Panning tutorial: I’m applying the code to pan an image strip rather than an entire background. It works fine, however, I’d like the effect to occur only when the mouse hovers on the image strip rather than all over the stage i.e. I need to constrain the effect to certain ymouse coordinates. I’m no expert at this. Could anyone help? Thanks in advance.


this.onMouseMove = function() {

constrainedMove(bg_mc, 4, 1);
};

function constrainedMove(target:MovieClip, speed:Number, dir:Number) {

var mousePercent:Number = _xmouse/Stage.width; 
var mSpeed:Number;
if (dir == 1) {

mSpeed = 1-mousePercent;

} else {

mSpeed = mousePercent;

}

target.destX = Math.round(-((target._width-Stage.width)*mSpeed));
target.onEnterFrame = function() {

if (target._x == target.destX) {

delete target.onEnterFrame;

} else {

target._x += Math.ceil((target.destX-target._x)*(speed/100));

}


};

}