Interactive rotate object to follow movement of mouse

New Here ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied

How can I create this rotation (following mouse movement) on an image, in Animate? http://jsfiddle.net/opherv/ddGHz/

Views

609

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied

It was a start. I need to rotate an image file the same way.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 13, 2020 May 13, 2020

Copy link to clipboard

Copied

Hi again.

 

Place the image inside of a Movie Clip instance.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 22, 2020 May 22, 2020

Copy link to clipboard

Copied

LATEST

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;
});

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines