AS: Main
Yet another, AS thread! This thread will teach you different ways for a MC to follow your mouse!
This is the first code. It makes the object follow your mouse:
onClipEvent (enterFrame) {
_y=_root._ymouse;
_x=_root._xmouse;
}
This code simple says that this objects _x and _y must follow the mouses _x and _y.
Now, if you want a code that makes a MC move only side-to-side with your mouse,
give it this code:
onClipEvent (enterFrame) {
_x=_root._xmouse;
_x=_root._xmouse;
}
This code simply says that only the MC's _x should only follow the mouse's _x.
This is a code that makes a MC move up and down with the mouse. Give it this code:
onClipEvent (enterFrame) {
_y=_root._ymouse;
_y=_root._ymouse;
}
This code simply says that only the MC's _y should only follow the mouse's _y.
I hope Denvish doesn't get mad for so many AS threads! XD