[Tweener] onComplete doesn't fire (AS3)
Sascha
sbalkau at gmail.com
Wed Sep 10 23:35:21 PDT 2008
I got this code:
----
var b:Bitmap = p.tweenImage;
Tweener.addTween(b, {x: xPos, time: 0.8, transition: "easeOutCubic"});
Tweener.addTween(b, {y: yPos, time: 0.8, transition: "easeOutCubic"});
Tweener.addTween(b, {scaleX: 0.96, time: 0.8, transition: "easeOutCubic"});
Tweener.addTween(b, {scaleY: 0.96, time: 0.8, transition: "easeOutCubic"});
Tweener.addTween(b, {rotation: r, time: 0.8, transition: "easeOutCubic"});
Tweener.addTween(b, {alpha: 0, delay: 0.6, time: 0.4, transition:
"easeOutCubic",
onComplete: onTweenComplete});
public function onTweenComplete(e:Event = null):void
{
trace("Removing: " + e.target);
}
----
However the onComplete is never fired? I've also tried adding
'onCompleteScope: this' which as I understand it points to the class where
the code is in but the onTweenComplete method is still not called? What am I
doing wrong here?
Sascha
More information about the Tweener
mailing list