
bastiank
-
Posts
3 -
Joined
-
Last visited
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
ScrollTrigger Demos
Downloads
Posts posted by bastiank
-
-
One more question about pause behaviour of timelines and tweens:
if you do the following:
var tl = new TimlineMax({paused:true}); var tween = new TweenMax(element, duration, {someVars, paused:true}); // pause the tween upon creation tl.insert(tween); tl.play(); // ==> nothing happens
Isn't the timeline supposed to play the containing tweens?
If I only pause the timeline upon creation and not the tween, that will be inserted afterwards, everything works fine.
I think that the timeline should overwrite the paused state of it's containing elements.
Thanks for a short hint!
Bastian
-
Hi,
just wanted to let you know that it seems that clear() on a timeline does not remove eventCallbacks. It doesn't matter if they are set by the constructor or afterwards with eventCallback('eventtype', function)
I'm using latest Chrome and the latest TweenMax & TimelineMax JS versions on Windows 8 (shouldn't matter)
just try the following:
var tl = new TimelineMax({onComplete: function() {console.log('complete');}}); tl.eventCallback('onComplete'); //returns function tl.eventCallback('onReverseComplete', function() {console.log('reversed');}); tl.clear(); tl.eventCallback('onReverseComplete'); // still there tl.eventCallback('onComplete'); // still there
Although eventCallbacks get not killed, the containing tweens and timelines are removed and the totalDuration is 0 afterwards.
Would be nice if someone could confirm that!
Timeline.clear() not removing Callbacks
in GSAP
Posted
Thank you for your quick response! Just read the docs before and I think I was kind of confused because it says 'Empties the timeline of all ... callbacks'.
But now I understand that custom callbacks are meant and not the internal ones (complete, reverseComplete etc.).