Please help me.
I have scripted for a movieclip to pan left and right according to the mouse but i want it to stop when the side of the movieclip reached the side of the mask. That is i don't want to see the background behind, i want the movieclip to stop panning exactly before the bg reveals. Please review my source file and tell me what's wrong. thanx

[FILE]

i think this is the part that went wrong

myClip = movie1;
if (myClip._x< -119) {
stopDrag();
} else {
startDrag("drag", true);
}
xposition = getProperty("movie1", _x);
movie1._x += (xposition+drag._x)/((100-speed)*-1);
movie1._x += (xposition+drag._x)/((100-speed)*-1)+num;
movie1._x += (xposition+drag._x)/((100-speed)*-1)-num;