# Interactive rotating meter. Help!

**URL:** <https://forum.kirupa.com/t/interactive-rotating-meter-help/248333>\
**Category:** Uncategorized\
**Created:** [January 7, 2008, 8:22am UTC](https://forum.kirupa.com/t/interactive-rotating-meter-help/248333 "2008-01-07T08:22:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kazaa13](https://avatars.discourse-cdn.com/v4/letter/k/b4bc9f/32.png) [@kazaa13](https://forum.kirupa.com/u/kazaa13)\
**Post date:** [January 7, 2008, 8:22am UTC](https://forum.kirupa.com/t/interactive-rotating-meter-help/248333/1 "2008-01-07T08:22:18Z")

</div>

hi there  
i got a problem with my rotating meter. it works with key press.

Z= 1/4  
X = 1/2  
C = 3/4  
V = 4/4  
R = reset the meter to zero

the problem it tat the meter just go haywire when it goes more than 180 degrees rotation. so i cant get it go to 3/4 and beyond. i dunno where i go wrong. any kind soul to help me. thanks alot.

```auto

var rSpeed:Number = 5;

function dMove(obje, rot) {
    obje.onEnterFrame = function() {
        mover = (rot-this._rotation)/rSpeed;
        this._rotation += mover;
        largeDisc._rotation = disc._rotation;
    };
}

var keyListener = new Object();
keyListener.onKeyDown = function() {
    // play meter 1/4
    if (Key.getCode() == 90) {
        dMove(disc, 65);
    }
    // play meter 1/2
    if (Key.getCode() == 88) {
        dMove(disc, 145);
    }
    // play meter 3/4
    if (Key.getCode() == 67) {
        dMove(disc, 200);
    }
    // play meter 4/4 (full)
    if (Key.getCode() == 86) {
        dMove(disc, 300);
    }
    //reset key r
    if (Key.getCode() == 82) {
        dMove(disc, 0);
    }
};
Key.addListener(keyListener);
stop();

```
