as3 tween position relative to current position
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,开发者_Go百科 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
var manX:Tween = new Tween(man, "x", Regular.easeOut, man.x, man.x - 40, 1, true);
精彩评论