Jump to content
Search Community

Animation repeat in Adobe Animate cc2017

fadyhenen test
Moderator Tag

Go to solution Solved by fadyhenen,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

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

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.
 

 
  • Like 3
Link to comment
Share on other sites

  • Solution

It works now 

 

Thank you so much Oliver 

 

really appreciate your help  B)

 

 

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' )
 
:mrgreen:  :geek:  :mrgreen:  :geek:
  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...