# \_rotation?

**URL:** <https://forum.kirupa.com/t/-rotation/92830>\
**Category:** Uncategorized\
**Created:** [October 22, 2003, 10:01am UTC](https://forum.kirupa.com/t/-rotation/92830 "2003-10-22T10:01:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nasier](https://avatars.discourse-cdn.com/v4/letter/n/839c29/32.png) [@Nasier](https://forum.kirupa.com/u/Nasier)\
**Post date:** [October 22, 2003, 10:01am UTC](https://forum.kirupa.com/t/-rotation/92830/1 "2003-10-22T10:01:39Z")

</div>

Ive this problem with rotating an object.  
What I want to do is rotate an object to  
108 degrees than rotate it back to 72 degrees.

So what I did was:  
[AS]  
onClipEvent (load) {

// set speed  
rotationSpeed = 2;

}

onClipEvent (enterFrame) {  
// start the motion  
\_rotation += rotationSpeed;

// rotate back when gone to far.  
if (\_rotationSpeed \>= 108) {  
rotationSpeed \*= -1;

// stop at 72 degrees  
if (\_rotation == 72) {  
\_rotationSpeed = 0;  
}  
}  
}  
[/AS]  
Atleast thats what I thought would work. but the stupid thingie rotates to 108 degrees, then rotates back the other way BUT DOESNT STOP AT 72 DGREES!!!

what am I doing wrong?

Nasier
