# Circle rotation not working

**URL:** <https://forum.kirupa.com/t/circle-rotation-not-working/276901>\
**Category:** flash\
**Created:** [December 4, 2008, 8:26pm UTC](https://forum.kirupa.com/t/circle-rotation-not-working/276901 "2008-12-04T20:26:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dabamol](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@dabamol](https://forum.kirupa.com/u/dabamol)\
**Post date:** [December 4, 2008, 8:26pm UTC](https://forum.kirupa.com/t/circle-rotation-not-working/276901/1 "2008-12-04T20:26:17Z")

</div>

Okay…I’ll try this again. Got a seemingly simple problem which has been driving me nuts for two days now. I have a circle, and every time I click it, I want it to rotate counter-clockwise 36 degrees (360/10 = 36). It works fine up until I click it the 6th time, where all of a sudden, it does a full 360 rotation before landing in the right spot. Here’s the code:

```auto
import caurina.transitions.*;

var numItems:Number = 10;
var oldDeg:Number = 0;
var count:Number = 0;

var txt:TextField = new TextField();
txt.x = txt.y = 20;
addChild(txt);

ball_mc.addEventListener(MouseEvent.CLICK, moveIt);

function moveIt(e:MouseEvent):void {
	txt.text = count.toString();
	count++;
	
	var radians:Number = (Math.PI * 2)/numItems;
	var degrees:Number = radians * 180 / Math.PI;
	var newDeg:Number = oldDeg - degrees;
	oldDeg = newDeg;
	Tweener.addTween(e.target, {rotation:newDeg, time:1, transition:'easeOutExpo'});
}

```

And the FLA is attached for convenience. Thanks in advance!
