Image Panning in nested MC

I am using the Image panning script from one of Kirupa.com’s tutorial. The instance name of the MC on stage is , contentMC, now what I want to do is I want this “Image panning” script to work which is inside my contentMC, called, glMC (contentMC -> glMC). The AS is not working, I have tried to change the acquiring values to _parent, but to no avail. Where am I going wrong?

Here’s the AS:
this.onMouseMove = function() {
constrainedMove(glMC, 4, 1);
};
function constrainedMove(target:MovieClip, speed:Number, dir:Number) {
var mousePercent:Number = _parent._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 if (target._x>target.destX) {
target._x -= Math.ceil((target._x-target.destX)
(speed/100));
} else if (target._x<target.destX) {
target._x += Math.ceil((target.destX-target._x)*(speed/100));
}
};
}