-
fukin help
i need to know how to create limits for an animation i have created.
the script is as folows
rolly._x=_xmouse
with rolly being the instance name of my movie clip.
now i only want the object to follow the mouse in a certain area not the entire movie .
if anyone out there could help with this please get back to me .
cheers.
-
This kinda tricky way to do this...
Make a blank frame (I mean empty) with action stop() in your rolly, name frame "hide_cur" (just for hiding the dragged clip) and then...
Place this script in your rolly:
Code:
onClipEvent(enterFrame){
Mouse.hide();
xTarget = _root._xmouse;
yTarget = _root._ymouse;
// here You can change the limits
if ((xTarget>690) || (xTarget<100) || (yTarget>290) || (yTarget<1)){
Mouse.show();
this.gotoAndPlay("hide_cur");
_y += (yTarget-_y);
_x += (xTarget-_x);
} else {
this.gotoAndPlay(1); // or any with the content...
_y += (yTarget-_y);
_x += (xTarget-_x);
}
}
It`s seems to be little bit complicated, but it works...
Or You can use :
Code:
_root.rolly.startDrag( True, left_limit, top_limit, right_limit, bottom_limit );
ZeroIQ
-