# Rotating a object

**URL:** <https://forum.kirupa.com/t/rotating-a-object/301811>\
**Category:** flash\
**Created:** [December 16, 2009, 5:10am UTC](https://forum.kirupa.com/t/rotating-a-object/301811 "2009-12-16T05:10:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peterw](https://avatars.discourse-cdn.com/v4/letter/p/bb73d2/32.png) [@Peterw](https://forum.kirupa.com/u/Peterw)\
**Post date:** [December 16, 2009, 5:10am UTC](https://forum.kirupa.com/t/rotating-a-object/301811/1 "2009-12-16T05:10:48Z")

</div>

Dear All thank you for your help  
I have a small movie where I rotate one circle and then want to rotate another circle to align to the first movie clips rotation .I can rotate the object no problems but when I want to align the rotation using the other movie clip I am having Problems.  
the Idea is once you select the card position(Heading ) the Conmpass then follows the card to show the correct heading at the top .

First Rotation is controlled by a button on press rotates card  
on release deletes onEnterFrame  
this.onEnterFrame=function(){  
wheel\_mc.\_rotation+=5;

}  
Second rotation also controlled by a button rotates compass  
if (this.card\_mc.\_rotation == this.compas\_mc.\_rotation) {  
gotoAndStop(1);// deletes on enter frame  
}  
this.onEnterFrame = function() {  
this.compas\_mc.\_rotation -= 5;  
};  
Any help appreciated  
Zip FLa attached
