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

Was it helpful?

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
scroll top