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.
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?