I’m trying to trace a simple tween using Tweener, but the onComplete doesn’t seem to work. Am I doing something wrong?
import caurina.transitions.*;
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
function enterFrameHandler(event:Event):void {
Tweener.addTween(block_mc, {rotationY:180, time:1, onComplete:flipInitComplete});
}
function flipInitComplete(e:Event):void {
trace("hello");
}
You could think of Tweener as acting independently of the timeline, much like a Timer. You don’t need to call Tweener.addTween() every frame. Just call it once and it will run. Right now your Tweener never completes because you keep restarting the Tween every frame.