as3 tween position relative to current position
-
22-09-2019 - |
Question
I have a tween set on a timer:
var manTimer:Timer = new Timer(1000,14);
manTimer.addEventListener(TimerEvent.TIMER, moveMan);
function moveMan(e:TimerEvent):void {
var manX:Tween = new Tween(man, "x", Regular.easeOut, 0, -40, 1, true);
}
I just need to make the tween's position relative to it's current position, as opposed to starting at the stage's 0 position then moving the the stage's -40 position. It needs to start at its current position the move -40 from that position.
Thanks, Wade
Solution
var manX:Tween = new Tween(man, "x", Regular.easeOut, man.x, man.x - 40, 1, true);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow