Jump to content
Search Community

How i use TimelineMax to sequence animations?

felipexavier test
Moderator Tag

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

I have the image of a painting and on this painting will appear 3 color images. I showed them. The problem is who are appearing at the same time and it can not happen. can anybody help me?

 

code:

var tl = new TimelineMax({delay:1, repeat:-1});
tl.from(color1, 2, {left: 200, opacity:0, repeat:-1}).from(color2, 2, {left: 200, opacity:0, repeat:-1}).from(color3, 2, {left: 200, opacity:0, repeat:-1});


sorry for the horrible English

Link to comment
Share on other sites

hi and welcome to the GreenSock forums.

 

since the first tween has repeat:-1 it will never end and thus the next tween will never start.

 

try this

 

var tl = new TimelineMax({delay:1, repeat:-1});
tl.from(color1, 2, {left: 200, opacity:0, repeat:-1})

.from(color2, 2, {left: 200, opacity:0, repeat:-1}, 2) //start at 2 seconds

.from(color3, 2, {left: 200, opacity:0, repeat:-1}, 4); //start at 4 seconds
  • Like 2
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...