Play timeline backward
March 13th, 2007 by Slav
There are times where you would like for an animation on a timeline to be played backwards. This class does just that.
It strength is in it’s simplicity. To use it, simply pass the reference of a movie clip instance to it and from that moment on it will play the movie clip timeline backward.
this is code used in the example above
import com.durej.utils.PlayTimelineBackward;
import mx.utils.Delegate;
function playAnimationBackwards()
{
var backwardAni = new PlayTimelineBackward(ani_mc);
}
function playForward()
{
ani_mc.play();
}
play_btn.onRelease = Delegate.create(this,playForward);
playBack_btn.onRelease =Delegate.create(this,playAnimationBackwards);


February 20th, 2009 at 4:35 am
How can I stop the animation during the reverse on a specific frame? A simple Stop didn’t seem to work.
May 5th, 2009 at 7:49 pm
Did anyone figure out how to stop the animation during reverse?
May 5th, 2009 at 9:20 pm
David:
make backwardAni variable with a class scope
add following to the script :
public function stop():Void
{
delete timeline.onEnterFrame;
}
and then call backwardAni.stop();
that should stop the animation…
October 14th, 2009 at 7:37 pm
Can you elaborate please?
June 6th, 2010 at 4:27 pm
im trying to use your code but it says in my compiler error
Scene=Scene 1, layer=Layer 4, frame=1, Line 6
The class or interface ‘com.durej.utils.PlayTimelineBackward’ could not be loaded.
June 6th, 2010 at 4:27 pm
this is the file i downloaded from here by the way when i run it its broken :S
June 6th, 2010 at 7:40 pm
Misteremg: My guess is you aren’t placing the class correctly in your classpath.
Make sure
1. it’s in the correct directory structure that reflects it’s package name.
2. Your classpath definition in your IDE is correctly set up as well.