# Rotating a MC from 0 to 180 deg working... kind of

**URL:** https://forum.kirupa.com/t/rotating-a-mc-from-0-to-180-deg-working-kind-of/213855
**Category:** Uncategorized
**Created:** [January 23, 2007, 7:34pm UTC](https://forum.kirupa.com/t/rotating-a-mc-from-0-to-180-deg-working-kind-of/213855 "2007-01-23T19:34:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dalewb](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dalewb/32/3029_2.png) [@dalewb](https://forum.kirupa.com/u/dalewb)
#### Post date: [January 23, 2007, 7:34pm UTC](https://forum.kirupa.com/t/rotating-a-mc-from-0-to-180-deg-working-kind-of/213855/1 "2007-01-23T19:34:12Z")

</div>

Hi, I’ve created some code that rotates an arrow up or down when the user clicks on it, depending on whether the timeline is on frame 1 or 5. The problem I am encountering is that rather than rotating visually, it just flips to the correct degree (in this case, 0 or 180). I’m sure it’d be clear to someone else, but I can’t find my error (this is also my first time coding something in this fashion):

```auto

function turndown():Void{
    for(i=0; i<16; i++){
        this.upDownMC._rotation += 11.25;
    }
}
function turnup():Void{
    for(i=0; i<16; i++){
        this.upDownMC._rotation -= 11.25;
    }
}
function goBack():Void{
    for(i=0; i<5; i++){
        this.prevFrame();
    }
}
onEnterFrame = function():Void {
    if(this._currentframe == 1){
        this.upDownMC.onRelease = function(){
            play();
            turndown();
        }
    }else if(this._currentframe == 5){
        this.upDownMC.onRelease = function(){
            goBack();
            turnup();
        }
    }
}

```

thanks!
