# Problem with rotation

**URL:** <https://forum.kirupa.com/t/problem-with-rotation/233699>\
**Category:** flash\
**Created:** [July 26, 2007, 5:09am UTC](https://forum.kirupa.com/t/problem-with-rotation/233699 "2007-07-26T05:09:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tommsund](https://avatars.discourse-cdn.com/v4/letter/t/439d5e/32.png) [@tommsund](https://forum.kirupa.com/u/tommsund)\
**Post date:** [July 26, 2007, 5:09am UTC](https://forum.kirupa.com/t/problem-with-rotation/233699/1 "2007-07-26T05:09:51Z")

</div>

Hi,

I’ve a difficult problem with my poll - [http://tommisundqvist.com/demo/demo.html](http://tommisundqvist.com/demo/demo.html) - grades 80 and 100 crosses 180 degrees in this rotation when _this.\_rotation_ never get the value of _asteLuku_. Of course I could set the value of _asteLuku_ like -175 and -125, but then the pointer rotate wrong direction. How can I solv this situation? Can I define the direction of rotation or…? 🙂

Thanks in advance.  
-Tommi

```auto
[SIZE=2][FONT=Courier New]var listenerObject:Object = new Object();
listenerObject.click = function( eventObj:Object ):Void{
      
      if(radioArvio1.selected == true){
            radioArvioTulos = 20;
            asteLuku = 48.5;
            }
      if(radioArvio2.selected == true){
            radioArvioTulos = 40;
            asteLuku = 90;
            }
      if(radioArvio3.selected == true){
            radioArvioTulos = 60;
            asteLuku = 137;
            }
      if(radioArvio4.selected == true){
            radioArvioTulos = 80;
            asteLuku = 185;
            }
      if(radioArvio5.selected == true){
            radioArvioTulos = 100;
            asteLuku = 235;
            }
      
mc_mittaritaulu_suuri.mc_viisari_suuri.onEnterFrame = function()
{
      this._rotation += (asteLuku-this._rotation)/5;
                  
                  
      //inforuutu, jossa näkyy arvo this._rotation
      tr = this._rotation;
}
};
arvosanat.addEventListener( "click", listenerObject );
[/FONT][/SIZE]

```
