- Sold between 250 000 and 1 000 000 dollars
- Has been a member for 6-7 years
- Author had a File in an Envato Bundle
- Most Wanted Bounty Winner
- Interviewed on the Envato Notes blog
- Author was Featured
- Item was Featured
- South Africa
Been messing around with this for a while but can’t get it right, basically I’m trying to get the arrow to always go around clockwise, depending on which button is pressed, but still keeps going backwards… any ideas? The result must be the arrow stops depending which block is pressed, lol seems simple enough doesn’t it? 

import mx.transitions.Tween;
import mx.transitions.easing.*;
function tweenAngle(angle) {
if (Math.abs(0-Number(angle))>180) {
goToAngle = -Math.abs(0-Number(angle))+2*Math.abs(180-Number(angle));
} else {
arrow_mc._rotation = 360;
goToAngle = Math.abs(0-Number(angle));
}
var tween_angle:Tween = new Tween(arrow_mc, "_rotation", null, arrow_mc._rotation, goToAngle, 10, false);
}
bttn1.onPress = function(){
tweenAngle(90)
}
bttn2.onPress = function(){
tweenAngle(270)
- Envato Staff
- Reviewer
- Sold between 100 000 and 250 000 dollars
- Author had a Free File of the Month
- Featured in a Magazine
- Author was Featured
- Item was Featured
- Bought between 10 and 49 items
Short answer: use TweenLite
http://www.greensock.com/as/docs/tween/com/greensock/plugins/ShortRotationPlugin.htmlor
http://www.greensock.com/as/docs/tween/com/greensock/plugins/CirclePath2DPlugin.htmlLong answer: The mx Tween class does all internal calculations between tween variables, either writing your own tween function with some math tweaks for expected behavior or using TweenLite for the sake of simplicity.
PS: I guess Wordpress bored you after a while 
- Sold between 250 000 and 1 000 000 dollars
- Has been a member for 6-7 years
- Author had a File in an Envato Bundle
- Most Wanted Bounty Winner
- Interviewed on the Envato Notes blog
- Author was Featured
- Item was Featured
- South Africa
RimmonTrieu said
Short answer: use TweenLite http://www.greensock.com/as/docs/tween/com/greensock/plugins/ShortRotationPlugin.htmlor
http://www.greensock.com/as/docs/tween/com/greensock/plugins/CirclePath2DPlugin.htmlLong answer: The mx Tween class does all internal calculations between tween variables, either writing your own tween function with some math tweaks for expected behavior or using TweenLite for the sake of simplicity.
PS: I guess Wordpress bored you after a while![]()
Thanks..Yeh I’m guessing the built in class ain’t gonna cut it, need to use greensock then… Nah this is for a local client job.. still doing the wordpress thing 
- Sold between 250 000 and 1 000 000 dollars
- Has been a member for 6-7 years
- Author had a File in an Envato Bundle
- Most Wanted Bounty Winner
- Interviewed on the Envato Notes blog
- Author was Featured
- Item was Featured
- South Africa
function tweenAngle(angle) {
goToAngle = angle;
time = (angle-arrow_mc._rotation)/4
var tween_angle:Tween = new Tween(arrow_mc, "_rotation", Regular.easeInOut, moon_mc._rotation, goToAngle, time, false);
}
OK turns out just this code will do the trick, wow
I’m slow today 
