Jump to content
Search Community

Setting up TimelineLite

marcusfriberg test
Moderator Tag

Recommended Posts

Hi,

 

I am having problem with setting up a timeline using TimelineLite.

 

The animations work perfectly by themselves using delays, but I guess I do something wrong when I try to put them in a timeline.

 

This is what one of my timelines look like. This one doesn't animate anything at all.

var tl = new TimelineLite();

tl
.to(mcBall, 2.8, {_x:86, _y:500, _rotation:7200, ease:Expo.easeIn, overwrite:false})
.to(mcBall, 0.2, {_x:88, _y:480, ease:Sine.easeInOut, overwrite:false})
.to(mcBall, 0.2, {_x:90, _y:500, ease:Sine.easeInOut, overwrite:false} );

And here is what another attempt looked like. Here the animation works but it seems that all animations start at the same time.

var tl = new TimelineLite();
tl.add( new TweenLite.to(mcBall, 2.8, {_x:86, _y:500, _rotation:7200, ease:Expo.easeIn, overwrite:false}) );
tl.add( new TweenLite.to(mcBall, 0.2, {_x:88, _y:480, ease:Sine.easeInOut, overwrite:false}) );
tl.add( new TweenLite.to(mcBall, 0.2, {_x:90, _y:500, ease:Sine.easeInOut, overwrite:false}) );

Here is what my original code looks like;

TweenLite.to(mcBall, 2.8, {_x:86, _y:500, _rotation:7200, delay:0, ease:Expo.easeIn, overwrite:false});
TweenLite.to(mcBall, 0.2, {_x:88, _y:480, delay:2.8, ease:Sine.easeInOut, overwrite:false});
TweenLite.to(mcBall, 0.2, {_x:90, _y:500, delay:3, ease:Sine.easeInOut, overwrite:false});

Help is much appreciated!

 

- Marcus

Link to comment
Share on other sites

It's hard to tell just by your code, which looks fine.

 

Please make sure you are using the latest version of GSAP. Click the getGSAP button on this page and download the zip. The latest version is 12.1.5

 

In your file you can get the version number with

 

trace(TweenLite.version)

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