— React-Native Programmierer . Patrick Tresp

Frame Tween force playing forward // TweenLite

When having an external SWF file which needs to be tweened in frames ( e.g. multiple buttons to control the position of swf file ) it always throws performance issues while tweening a frame which is before the current frame ( meaning: reverse tweens ).

After some research i thankfully found following way to force a tween to play forward and loop to reach the desired frame. ( e.g. movie with totalframes 100 is at frame 50, button action: tween to frame 10 )

I was really glad i found this!

TweenLite is downloadable at : http://www.greensock.com/

// header
import com.greensock.TweenLite;
import com.greensock.plugins.*;
 
// function
TweenPlugin.activate( [ FramePlugin ] );
TweenPlugin.activate( [ FrameForwardPlugin ] );
 
var frameForward : uint = 10;
var time: Number = 1;
var _animation : Sprite = getChildByname("animation");
 
TweenLite.to( _animation, time, { frameForward:targetFrame, ease:"easeInOutExpo" } );
0 comments
Submit comment