AS3: Programmatic Tweening Tip
0 Comments Published by David Kingsnorth on Thursday, December 04, 2008 at 7:05 PM.
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);
}
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