Jump to content
Search Community

Animating whole timeline on another timeline/tweenmax?

Remigiusz Szwed 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

Hello

 

I have a (probably) silly question - is it possible to animate whole timelineMax via tweenmax or another (parent) timelineMax? I have long experience as flash/adobe animate animator and I normally would put animation in movieclip and then animate that mc (like for example in simulating camera zoom). I could probably make something like that with gsap (put timelineMax into mc, then make another timelineMax/tweenMax on root), but it isn't greatest solution...

 

Thanks, Remigiusz

Link to comment
Share on other sites

Ya you can control timeline using TweenMax by animating the progress of the Timeline. In following demo animation progresses by 10% every time you click anywhere. It is similar to animating any normal property. Another trick is to use tweenTo method of TimelineMax, it lets you tween upto certain time or label. You can also use tweenFromTo, you can read more on docs. There might be few other tricks, @GreenSock or @Carl can cover it.

 

See the Pen aVajjz?editors=0010 by Sahil89 (@Sahil89) on CodePen

 

  • Like 4
Link to comment
Share on other sites

@Sahil's advice is exactly right, although I think he added the wrong demo.

 

Here is a tweenTo() example:

 

See the Pen RjYLOW?editors=1010 by GreenSock (@GreenSock) on CodePen

 

Notice that tl does some animations on 3 boxes in direct succession.

 

master tl is set up to alternate between animating the backgroundColor of the body and tweening to different labels in tl.

Notice that the when the orange box animates it has a bounce.easeOut applied.

 

 

  • Like 5
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...