Master guru god-like
- Started
- Last post
- 5 Responses
- canadian
WARNING!
This question is deep. Deeper than I have ever gone. I am scared. Cold.
Here is what I have so far (thanks to Simon) and below this code is my question.
onClipEvent (load) {
// creates a staggered movement
speed = 9;
open = false;
}
onClipEvent (enterFrame) {
// ////////// this gets area of the box on the root, if you want to make the area bigger edit the box //
mc = _root.bounds.getBounds(_root);
if ((_root._xmouse>mc.xMin) and (_root._xmousemc.yMin) and (_root._ymouse<mc.yMax)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
//
} else {
if (!open) {
_x += (_parent._xmouse-_x)/speed;
_y += (_parent._ymouse-_y)/speed;
}
}
// /////////// if using pixel fonts leave bellow //
_x = Math.round(_x);
_y = Math.round(_y);
}
}The above code makes my MC follow my cursor within a specific boundry and stops when it reaches the cursor. Very well. Perfect. BUT I had to embed my "Stop" command (which needs to stop the tween action on the stage) within the MC and now it no longer stops the tween on the stage. How should I target the stage within the MC?
- canadian0
ohmmmm.
- canadian0
I know someone must know.
- o0o0
_root.stop() should work.. is that what you're using now?
- canadian0
No. I wasn't. thank you. will try now.
- Unclickable0
delete (mc.onEnterFrame);