# Simple problem, hard to define

**URL:** <https://forum.kirupa.com/t/simple-problem-hard-to-define/201062>\
**Category:** flash\
**Created:** [September 18, 2006, 8:59am UTC](https://forum.kirupa.com/t/simple-problem-hard-to-define/201062 "2006-09-18T08:59:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kimpa\_se](https://avatars.discourse-cdn.com/v4/letter/k/6bbea6/32.png) [@kimpa\_se](https://forum.kirupa.com/u/kimpa_se)\
**Post date:** [September 18, 2006, 8:59am UTC](https://forum.kirupa.com/t/simple-problem-hard-to-define/201062/1 "2006-09-18T08:59:49Z")

</div>

Hi,

I’m not really good at actionscript so this might just demand a simple answer. I’ve included a picture so that you easily can refer to the code.

![](http://www.kimpa.se/pzero/dump.jpg)

```auto
wheel_pos = wheel_mc._rotation;
destination = wheel_pos;
trace(wheel_pos);

btn.onRelease = function() {
    destination = 120;
}

onEnterFrame = function() {
    wheel_pos = wheel_mc._rotation;
    
    if (destination == wheel_pos) {
        wheel_mc._rotation = destination;
    } else if (destination > wheel_pos) {
        wheel_mc._rotation += 5;
    } else if (destination < wheel_pos) {
        wheel_mc._rotation -= 5;
    }
}

```

My problem is that I don’t know how to stop the tween. When the “destination” is equal to “wheel\_pos” it still plays the \_rotation +/- 5 and then back to “destination”. **How can I set the motion to 0?**
