Hi
Wishing you all a Happy 2019.
I have an animation requirement where I have a TimelineMax instance and number of TweenMax instances added to it and some of these TweenMax instances (not all) need to be repeated for number of times. So my question is can I create TimelineMax instances and add repeating instances to it and add these repeating TimelineMax instances to the main TimelineMax instance will it work.
Example:
// somewhere globally create main
var mainTimeline = new TimelineMax({repeat: false, paused: false});
//later on we loop through an array of objects
If (obj.repeat){
var tlr = new TimelineMax({repat:99, yoyo:true, paused: false});
tlr.add(TweenMax.to(obj, duration, { x:x,
y:y,
ease:Quint.easeOut,
onUpdate:updateDraw,
overwrite: "none" }));
}else{
//add TweenMax instances to mainTimeline
mainTimeline.add(TweenMax.to(obj, duration, { x:x,
y:y,
ease:Quint.easeOut,
onUpdate:updateDraw,
overwrite: "none" }));
}
mainTimeline.add(tlr, self.getDelay();
//end code
Thanks in advance