Is there a way to change the tween order after you append them in a Timeline,or play them in a different order?To be more specific in my example i animate an object,i rotate it and then moving it to x direction.I want when i reverse it to rotate first and then move back,no the other way around.Also another question,if i want to apply a delay on the timeline at the beginning a simply add as parameter,but how can i have also delay when i reverse it?
package {
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.MouseEvent;
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
import com.greensock.*;
import com.greensock.easing.*;
public class Document10 extends MovieClip {
private var timeline:TimelineMax;
private var flag : Boolean = true;
public function Document10( ) {
right.addEventListener(MouseEvent.CLICK, backState);
}
private function moveState ( )
{
flag = false;
timeline = new TimelineMax( );
timeline.insertMultiple([ new TweenLite(right, 0.5, {rotation : 180 }), new TweenLite(right, 1, {x :15, ease:None.easeOut }) ], 0 , TweenAlign.SEQUENCE );
}
private function backState ( ev : MouseEvent )
{
if (! flag )
doneState( );
else
moveState( );
}
private function doneState ( )
{
flag = true;
timeline.reverse( );
}
}
}