Copy link to clipboard
Copied
How can I create this rotation (following mouse movement) on an image, in Animate? http://jsfiddle.net/opherv/ddGHz/
Copy link to clipboard
Copied
Hi.
Didn't this answer work for you?
https://community.adobe.com/t5/animate/follow-cursor-animation/m-p/11110152?page=1#M203878
Copy link to clipboard
Copied
It was a start. I need to rotate an image file the same way.
Copy link to clipboard
Copied
Hi again.
Place the image inside of a Movie Clip instance.
Copy link to clipboard
Copied
Here is the exact example of what I want, but it seems that I'm missing something.
I finally got it 🙂 such a RELIEF 🙂
stage.enableMouseOver(30);
var _this = this;
stage.on('stagemousemove', function(e){
var radians = Math.atan2(e.localY - _this.movieClip_1.y, e.localX - _this.movieClip_1.x);
var degrees = radians*(180 / Math.PI);
_this.movieClip_1.rotation = degrees - 90;
});