Jump to content
GreenSock

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

Yoyo in a tween in a timeline

Recommended Posts

This works properly - a stand-alone tween:

TweenMax.to(rect, 2, {x:200, repeat:1, yoyo:true});

This does not - the same tween in a timeline - the initial translation works, but no repeat:

tl = new TimeLineMax();
tl.to(rect, 2, {x:200, repeat:1, yoyo:true})

I know that the timeline can be set to repeat and yoyo, but I just want a single tween in the timeline to repeat and yoyo.

 

Thanks, Gus

Link to comment
Share on other sites

Actually, you need to insert a TweenMax instance into the timeline. The convenience methods use TweenLite in order to minimize dependencies and file size. So you can simply do: 

tl.add( TweenMax.to(.... {repeat:1, yoyo:true}) );
Link to comment
Share on other sites

It's a pleasure to use your engine and work with you.

Thank you Jack.

  • Like 1
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.
×