# Serious Rotating Help

**URL:** https://forum.kirupa.com/t/serious-rotating-help/293432
**Category:** flash
**Created:** [July 28, 2009, 9:38pm UTC](https://forum.kirupa.com/t/serious-rotating-help/293432 "2009-07-28T21:38:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![zorminus](https://avatars.discourse-cdn.com/v4/letter/z/e95f7d/32.png) [@zorminus](https://forum.kirupa.com/u/zorminus)
#### Post date: [July 28, 2009, 9:38pm UTC](https://forum.kirupa.com/t/serious-rotating-help/293432/1 "2009-07-28T21:38:14Z")

</div>

Hey I have a Rotating Problem…

The Script for making a Object rotate after the mouse movements should look something like this

onClipEvent (enterFrame) {  
myRadians = Math.atan2(\_root.\_ymouse-this.\_y, \_root.\_xmouse-this.\_x);  
myDegrees = Math.round((myRadians\*180/Math.PI));  
\_root.yChange = Math.round(\_root.\_ymouse-this.\_y);  
\_root.xChange = Math.round(\_root.\_xmouse-this.\_x);  
this.\_rotation = myDegrees+90;  
}

Right?, i just need help to change it, so it follows a Movie clip instead of the mouse. =)
