Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Multiple animation with one element

Recommended Posts

I'm trying to create two separate animations on the same element. 

What I'd like it to do:


Fall in from the top of the screen...Then after that animation is completed, I want the same element to play another animation, but loop it and never repeat the first animation. Here is what I thought I could do.


TweenMax.from(".section1-circle1", 1.0, { ease: Bounce.easeOut, y: -822}, "+=0.5", {repeat: -1, yoyo:true, y: 15});


Any help would be nice. 

  • Thanks 1
Link to post
Share on other sites

Hi sheep0989 :)


Welcome to the GreenSock forum.


You could do that with two tweens and delay the second one until the first one is finished (or longer):

TweenMax.from(".section1-circle1", 1.0, { y: -822, ease: Bounce.easeOut });
TweenMax.to(".section1-circle1", 1.0, { y: 15, repeat:-1, delay:1, yoyo:true });

But I'd recommend a timeline:

var tl = new TimelineMax();

tl.from(".section1-circle1", 1.0, { y: -822, ease: Bounce.easeOut });
tl.to(".section1-circle1", 1.0, { y: 15, repeat:-1, yoyo:true });

If you have other questions, please make a CodePen so we may better assist you.




Happy tweening.


  • Like 3
Link to post
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.