The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Greensock TimelineLite Animation Sequences

Greensock TimelineLite Animation Sequences

10:18
TimelineLite is a piece of the Greensock TweenMax library that provides the ability to create sequenced animation with very little code or setup.
Watch this lesson now
Avatar
egghead.io

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

Avatar
Eduardo

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"

Avatar
Eduardo

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!

In reply to Eduardo
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?