Hi guys,
I'm having problems implementing the onCompleteAll function within my TimelineMax animation. My code looks like below
var tl = new TimelineMax();
tl
.from('.text1',0.5,{opacity:0, y:'+=10'})
.to('.text1',0.5,{opacity:0},'+=3')
.from('.text2',0.5,{opacity:0, y:'+=10'})
.staggerFrom('.footer',0.5, {opacity:0, y:'+=10'},0.2, addBirdEvent)
function addBirdEvent(){
console.log('footer animations done')
}
Problems are:
The stagger animation runs immediately. I'm expecting it to run after the previous animation ends.
The addBirdEvent (which is my onCompleteAll function) also runs immediately.
I also tried using onCompleteAll: addBirdEvent but theres an error saying 'missing ) after argument list.'
What do you think is wrong with my syntax?
Thanks in advance!