The following example shows how you can override the default frame rate for a programmatic tween in Flash by setting the Tween object’s FPS property.
Full code after the jump.
// ActionScript 3.0 import fl.transitions.Tween; import fl.transitions.easing.*; var tween:Tween = new Tween(mc, "x", Elastic.easeOut, 0, 300, 3, true); tween.FPS = 60; mc.addEventListener(MouseEvent.CLICK, onClick); function onClick(evt:MouseEvent):void { tween.start(); }
{ 2 comments… read them below or add one }
Thanks Peter
Great Stuff, I have done many work arounds in the past to keep tweens smooth