Hi Folks,
I am trying to do some simple tweens using Tweener, and am running into a problem regarding onComplete.
My goal is to tween a MC (instance name = MC1) into place (Y axis), then on completion of the tween, the script will execute a second tween on a second MC (instance name = MC2), while the 1st one stays where it was tweened to.
Instead, the 1st MC moves, then moves again, while the 2nd MC does nothing.
My AS3 code is this:
Code:
import caurina.transitions.Tweener;
function moveBar()
{
Tweener.addTween(MC1, {x: 400, y:431, time:7.500000E-001 * 2, onComplete:moveBoat, transition:"easeOut"});
}
moveBar();
function moveBoat()
{
Tweener.addTween(MC2, {x: 400, y:-200, time:7.500000E-001 * 2, onComplete:finishMeOff});
}
function finishMeOff()
{
// more of the same, etc.
}
Thanks very much for any thoughts,
s'Pk
import caurina.transitions.Equations; import caurina.transitions.Tweener; moveBar(); function moveBar():void { Tweener.addTween(MC1, {x: 400, y:300, time:7, transition:Equations.easeOutSine, onComplete:moveBoat}); } function moveBoat():void { Tweener.addTween(MC2, {x: 400, y:200, time:7, onComplete:finishMeOff}); } function finishMeOff():void { trace("finishMeOff"); }