Scrolling Images

Anyone know why this won’t work? I’m so close!!

It calls to functions and for some reason I thought it would work. If I comment out a function the other one will work. So both vertical and horizontal functions work, just not at the same time.

[AS]

this.onMouseMove = function() {
constrainedMoveV(bg_mc,20,1);
constrainedMoveH(bg_mc,20,1);
};

function constrainedMoveV(target:MovieClip, speed:Number, dir:Number) {
trace(“vertical”);
var mousePercent:Number = _ymouse/Stage.height;
if (dir == 1) {
vSpeed = 1-mousePercent;
} else {
vSpeed = mousePercent;
}

target.destV = Math.round(-((target._height-Stage.height)*vSpeed));

target.onEnterFrame = function() {
	if (target._y == target.destV) {
		delete target.onEnterFrame;
	} else {
		target._y += Math.ceil((target.destV-target._y)*(speed/100));
	}
};

}

function constrainedMoveH(target:MovieClip, speed:Number, dir:Number) {
trace(“height”);
var mousePercent:Number = _xmouse/Stage.width;
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));
	}
};

}

[/AS]