Greensock TimelineLite Animation Sequences

Lukas Ruebbelke
InstructorLukas Ruebbelke

Share this video with your friends

Send Tweet

TimelineLite is a piece of the Greensock TweenMax library that provides the ability to create sequenced animation with very little code or setup.

Eduardo
Eduardo
~ 6 years ago

hi I'm using angular with greensock. I want to be able to update a Scope variable or switch to a specific route when onComplete from a TweenMax animation, is this possible? I feel I need to approach my problem in a different way but I'm wondering if I can process angular code inside the onComplete function. I don't necessarily want to use routes, i do want to run animation before doing "something in angular"

Eduardo
Eduardo
~ 6 years ago

to give more insight, I'm doing something like this on an ng-click I have on a button calling a loadData function:

$scope.loadData = function (url) { TweenMax.to($('.pages li'), 1, {opacity: 0}); $timeout(function() { window.location.href = url; }, 1000); }

..and it feels like a hack cause I doing an animation that last 1 second, and also waiting 1 second before doing the location.href. I should be able to use a callback and I was expecting to use the onComplete from Greensock. Thanks!

Md Abdul Momin
Md Abdul Momin
~ 3 years ago

Community want to learn more about TweenMax, GSAP animation library.