|
-
how to set restraint when panning mc left and right
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;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|