# Porblem with \_rotation

**URL:** <https://forum.kirupa.com/t/porblem-with--rotation/64550>\
**Category:** Uncategorized\
**Created:** [September 17, 2004, 1:11pm UTC](https://forum.kirupa.com/t/porblem-with--rotation/64550 "2004-09-17T13:11:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eiwit666](https://avatars.discourse-cdn.com/v4/letter/e/87869e/32.png) [@eiwit666](https://forum.kirupa.com/u/eiwit666)\
**Post date:** [September 17, 2004, 1:11pm UTC](https://forum.kirupa.com/t/porblem-with--rotation/64550/1 "2004-09-17T13:11:22Z")

</div>

hi, i just joined the forum and now i have a question,  
Im working on something thats pretty enojing, this is the problem, im trying to create a cirkel with on the border a round button that works as a slider.  
When i slide the slider around the the rotation is being displayed in a tekstbox, ok so far so good. NOW the real problem the slider has to slide along the cirkel for 2 times and has to give the rotation value in degress until the rotation stops at 720 degrees/.

To make it clear: when you spin a cirkel 2 times and show the degrees it spinned than it wil only display 0-180-270-360 then it pops right back @ 0 i need it to go to 720 degrees. Please help 🙂 grts and thnx

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 17, 2004, 1:22pm UTC](https://forum.kirupa.com/t/porblem-with--rotation/64550/2 "2004-09-17T13:22:14Z")

</div>

Put this somewhere in your \_rotation code:

```auto

rotationVar = myMC._rotation;
if (rotationVar > 360) {
     _global.overflowVar = 360;
} else {
     _global.overflowVar = 0;
}

```

then something like this:

```auto
totalRotation = myMC._rotation + overflowVar;
myText.text = totalRotation;

```

It’s some rough sample code, but I think you get the idea. Hope this helps a bit.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 17, 2004, 1:25pm UTC](https://forum.kirupa.com/t/porblem-with--rotation/64550/3 "2004-09-17T13:25:51Z")

</div>

> [@newhopekenny](#):
>
> Put this somewhere in your \_rotation code:
> 
> ```auto
> 
> rotationVar = myMC._rotation;
> if (rotationVar > 360) {
> _global.overflowVar = 360;
> } else {
> _global.overflowVar = 0;
> }
> 
> ```
> 
> then something like this:
> 
> ```auto
> totalRotation = myMC._rotation + overflowVar;
> myText.text = totalRotation;
> 
> ```
> 
> It’s some rough sample code, but I think you get the idea. Hope this helps a bit.

thnx mate 🙂 gonne try it 🙂 realy hope it works , have tryed it for 2 days now whitout any succes grts
