Highlighted

Interactive rotate object to follow movement of mouse

New Here ,
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

585

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

Interactive rotate object to follow movement of mouse

New Here ,
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

586

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
May 12, 2020 0
Adobe Community Professional ,
May 12, 2020

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

__________________________________________
HTML5, JSFL, and AS3 samples: http://bit.ly/2mJgDoG

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
Reply
Loading...
May 12, 2020 1
New Here ,
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
Reply
Loading...
May 12, 2020 0
Adobe Community Professional ,
May 13, 2020

Copy link to clipboard

Copied

Hi again.

 

Place the image inside of a Movie Clip instance.

__________________________________________
HTML5, JSFL, and AS3 samples: http://bit.ly/2mJgDoG

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
Reply
Loading...
May 13, 2020 0
New Here ,
May 22, 2020

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

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
Reply
Loading...
May 22, 2020 0