Anyone know an easy wat to Randomize a TimelineMax?
I want to append several TweenMax instances and depending on user behavior, play the timeline with the instances in a different (random) order
For example, first plays it normally:
var timeline:TimelineMax = new TimelineMax({repeat:0});
//
timeline.append( TweenMax.from(mainMC1, 1, {alpha:0, blurFilter:{blurX:100, blurY:100}})-0.5);
timeline.append( TweenMax.from(mainMC2, 1, {alpha:0, scaleX:0.1}), -0.5);
timeline.append( TweenMax.from(mainMC3, 1, {alpha:0, scaleY:0.1}), -0.5);
timeline.append( TweenMax.from(mainMC4, 1, {alpha:0}), -0.5);
timeline.append( TweenMax.from(mainMC5, 1, {alpha:0}), -0.5);
//
and then restart with
timeline.invalidate();
timeline.restart();
and then "randomize" the appends is if it was like this:
timeline.append( TweenMax.from(mainMC5, 1, {alpha:0}), -0.5);
timeline.append( TweenMax.from(mainMC2, 1, {alpha:0, scaleX:0.1}), -0.5);
timeline.append( TweenMax.from(mainMC1, 1, {alpha:0, blurFilter:{blurX:100, blurY:100}})-0.5);
timeline.append( TweenMax.from(mainMC3, 1, {alpha:0, scaleY:0.1}), -0.5);
timeline.append( TweenMax.from(mainMC4, 1, {alpha:0}), -0.5);
any ideas?