Can anyone help me sort out a flip problem with an mc clip that follows the mouse and rotates towards the movement but flips awkwardly when you move the mouse again. here is the code
//Place this on the mc
onClipEvent (load) { //_x = 0; //_y = 0; speed = 6; area = 0; } onClipEvent (enterFrame) {
//attach mc to the pointer if mouse over the area if (area == 0) { this.play(); endX = _root._xmouse; endY = _root._ymouse; _x += (endX-_x)/speed; _y += (endY-_y)/speed;
//rotate MC to follow the mouse angle this.onMouseMove = function() { _rotation = (Math.atan2(_root._ymouse-_y, _root._xmouse-_x))*(180/Math.PI); ease = 3; }; } }
I’m a bit of a novice so I’m hoping it’s a line missing or so. I don’t know how to set up new functions.
Any help much appreciated.
Posted about 1 month ago











