Jump to content


Adding Tweens to TimeLineLite

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

Hi guys,

I am pretty new to GreenSock but desperately trying to learn more and use it as my main animation toolset.

So far I am absolutely loving it.

I am kinda stuck on the TimeLineLite portion of Petr's course on ihatetomatoes.

I am trying to add tweens to a timeline but as soon as i add the variable tl it stops working.

Please check out my code and help me figure out where I am going wrong.

I am sure it is super obvious to someone more experienced but I just can't seem to figure it out.

thanks in advance, appreciated!

See the Pen gKxzYx by roxanneallard (@roxanneallard) on CodePen

Link to comment
Share on other sites

Hi @RoxanneAllard :)


Welcome to the forum.


You just have a little problem with your scripts. 

// these are pointing to a local directory
<script type="text/javascript" src="js/greensock/plugins/CSSPlugin.min.js"></script>
<script type="text/javascript" src="js/greensock/TweenLite.min.js"></script>

// please switch to these
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.1/TweenLite.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.1/plugins/CSSPlugin.min.js"></script>


I'd recommend loading TweenMax instead as it will load the additional files by default. TweenMax loads:

  • TweenLite
  • TweenMax
  • TimelineLite
  • TimelineMax
  • CSSPlugin
  • AttrPlugin
  • RoundPropsPlugin
  • DirectionalRotationPlugin
  • BezierPlugin
  • EasePack

On CodePen this is really easy. Just hit the little gear icon on the JS panel and use the drop-down to load TweenMax. (& jQuery too)


That should get you running correctly.


Happy tweening.




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