PDA

View Full Version : follow mouse with constraints?


ripple
11-12-2001, 03:10 AM
I have a MC with an object that follows the mouse. But is there anyway to do this within a specific area WITHOUT using a button?
(similar to this tutorial: http://www.actionscripts.org/showMovie.php?id=270
but without the button?

Strok
11-12-2001, 04:03 AM
You can use a MC

onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
some_action_1;
} else {
some_action_2;
}
}

ripple
11-12-2001, 04:52 PM
That's it. Thank you.