Multimedia Blog

Research, Design & Reflection


AS3: Programmatic Tweening Tip

This is simple but I never knew it mattered before.

While looking for something completely different I just discovered why my tweens in AS3 sometimes break mid tween, especially when I am using multiple tweens within the same function.
You are meant to declare your tweens as variables before using them within a function like below. You can take a look at the full post HERE

var myTween:Tween;

function doTween(event:Event) :void
{

myTweenX = new Tween(this, "x", Regular.easeInOut, 10, 200, 1, true);
}

0 Responses to “AS3: Programmatic Tweening Tip”

Post a Comment



© 2006 Multimedia Blog