Jump to content

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

TimelineLite.complete() method removed?

Recommended Posts

Hi guys,


quick question - I've just grabbed the v12 version of the swc and it no longer recognises calls to the complete() method - has this been removed and if so, what is the accepted procedure to force a timeline to complete please (currently using tl.gotoAndStop(tl.totalDuration))?




Link to comment
Share on other sites

Yep, complete() was somewhat redundant and not frequently used, so in v12 we removed it to consolidate the API and reduce file size slightly. You can accomplish the same thing with:




Sorry about any confusion that caused. I'd definitely recommend checking out the v12 launch page where ALL of the changes are listed out (don't forget to click the "but wait there's more" link that shows all 40 changes). http://www.greensock.com/v12/ There are a lot of improvements that were made, a [very] few of which depart from v11's API. All the basics are the same as always and old code should work fine with a few exceptions (listed on that page).


Happy tweening!

Link to comment
Share on other sites

  • 1 year later...

could someone give a simple working example just how I would make something happen on completion of tween?

Link to comment
Share on other sites

Your question is separate to the original topic, but it's very simple - just add an onComplete function to your tween or timeline:

var foo = TweenLite.to(bar, 1, { x:100, onComplete:baz });

function baz() {

You can read about onComplete and other special properties in the TweenLite API (also available in TimelineLite). Next time please make a new topic for your issue unless it's directly related to the original topic. This helps keep the forums somewhat organised for future searches.

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