Share Posted April 2, 2017 Hi Guys, This code is inside Adobe Animate, and it is not working, and when i am adding tl. to the code to be tl.add(TweenMax.from(this.twofor3, 1, { scaleX:0, scaleY:0,alpha:0, ease:Elastic.easeOut, delay:0.0})); the timeline is not working properly when the animation stars the next starts when the first one ends... its not working smoothly every order in its time not to wait the animation before to ends, i want to know if i am missing something or should i add any thing to fix that, var tl = new TimelineMax({repeat:3, repeatDelay:1}); TweenMax.from(this.twofor3, 1, { scaleX:0, scaleY:0,alpha:0, ease:Elastic.easeOut, delay:0.0}); TweenMax.from(this.txt1, 0.75, { alpha:0, x:-50, ease:Power2.easeOut, delay:1.2}); TweenMax.from(this.txt2, 0.75, { alpha:0, x:-50, ease:Power2.easeOut, delay:3.2}); TweenMax.from(this.txt3, 0.75, { alpha:0, x:-50, ease:Power2.easeOut, delay:5.2}); TweenMax.from(this.whopper, 1, { alpha:0, y:+350, ease:Back.easeOut, delay:1}); TweenMax.from(this.fries, 1, { alpha:0, x:+350, ease:Back.easeOut, delay:3}); TweenMax.from(this.coca, 1, { alpha:0, x:+450, ease:Back.easeOut, delay:5}); TweenMax.from(this.whopper2, 1, { alpha:0, y:+350, ease:Back.easeOut, delay:1.2}); TweenMax.from(this.fries2, 1, { alpha:0, x:+350, ease:Back.easeOut, delay:3.2}); TweenMax.from(this.coca2, 1, { alpha:0, x:+450, ease:Back.easeOut, delay:5.3}); TweenMax.to(this.txt1, 0.75, { alpha:0, x:+250, ease:Power2.easeOut, delay:3}); TweenMax.to(this.txt2, 0.75, { alpha:0, x:+250, ease:Power2.easeOut, delay:5}); TweenMax.to(this.txt3, 0.75, { alpha:0, x:+250, ease:Power2.easeOut, delay:7}); TweenMax.from(this.ordernow, 0.75, { alpha:0, x:-50, ease:Power2.easeOut, delay:8}); TweenMax.to(this.ordernow, .75, {scaleX:1.70, scaleY:1.70, repeat:5, yoyo:true, repeatDelay:0.1, ease:Back.easeInOut, delay:9}); Archive.zip Link to comment Share on other sites More sharing options...
Share Posted April 2, 2017 It seems tl is independent from Your animation. Try to put the .from()/to()s into tl like: var tl = new TimelineMax( { repeat: 3, repeatDelay: 1 } ); tl .addLabel( 'myLabel1' ) .from( this.twofor3, 1, { scaleX: 0, scaleY: 0, alpha: 0, ease: Elastic.easeOut }, 'myLabel1' ) .from( this.txt1, 0.75, { alpha: 0, x: -50, ease: Power2.easeOut }, 'myLabel1+=1.2' ) .addLabel( 'myLabel2', 'myLabel1+=1' ) ... You can add tweens to the timeline with dot chaining. If You put labels at key time positions, You can easily control the delays. 3 Link to comment Share on other sites More sharing options...
Author Share Posted April 3, 2017 It works now Thank you so much Oliver really appreciate your help here after your help >>>> var tl = new TimelineMax( { repeat: 3, repeatDelay: 1 } ); tl .addLabel( 'myLabel1' ) .from( this.twofor3, 1, { scaleX: 0, scaleY: 0, alpha: 0, ease: Elastic.easeOut }, 'myLabel1' ) .from( this.whopper, 0.75, { alpha:0, y:+450, ease:Back.easeOut }, 'myLabel1+=1.2' ) .from( this.whopper2, 0.75, { alpha:0, y:+350, ease:Back.easeOut }, 'myLabel1+=1.4' ) .from( this.txt1, 0.75, { alpha: 0, x: -50, ease: Power2.easeOut }, 'myLabel1+=1.6' ) .to( this.txt1, 0.75, { alpha: 0, x: +750, ease: Power2.easeOut }, 'myLabel1+=3' ) .from( this.txt2, 0.75, { alpha: 0, x: -50, ease: Power2.easeOut }, 'myLabel1+=3.2' ) .from( this.fries, 0.75, { alpha:0, y:+350, ease:Back.easeOut }, 'myLabel1+=3' ) .from( this.fries2, 0.75, { alpha:0, y:+350, ease:Back.easeOut }, 'myLabel1+=3.2' ) .to( this.txt2, 0.75, { alpha: 0, x: +750, ease: Power2.easeOut }, 'myLabel1+=5' ) .from( this.txt3, 0.75, { alpha: 0, x: -50, ease: Power2.easeOut }, 'myLabel1+=5.2' ) .from( this.coca, 0.75, { alpha:0, y:+350, ease:Back.easeOut }, 'myLabel1+=5' ) .from( this.coca2, 0.75, { alpha:0, y:+350, ease:Back.easeOut }, 'myLabel1+=5.2' ) .to( this.txt3, 0.75, { alpha: 0, x: +750, ease: Power2.easeOut }, 'myLabel1+=7' ) .addLabel( 'myLabel2' ) .from( this.ordernow, 0.75, { scaleX:1.20, scaleY:1.20,alpha:0, ease:Elastic.easeOut }, 'myLabel2' ) .to( this.ordernow, 0.75, { scaleX:1.70, scaleY:1.70, repeat:5, yoyo:true, repeatDelay:0.1, ease:Back.easeInOut }, 'myLabel2+=1' ) 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now