Dan Burns
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Dan Burns
-
-
Hello - I'm new to GSAP - thanks for creating a great tool.
I'm attempting to play a nested timeline (TimeLineOne) a second time with different parameters than the first time it is run. Timeline runs at same duration in both instances. Any guidance would be greatly appreciated.
TweenMax.set(".AnimBox", {opacity:.5}); var TimeLineOne = new TimelineMax({paused: true}); TimeLineOne .to(".AnimBox", 1, {y: -100, opacity:1, rotation: 45}); var TimeLineMaster = new TimelineMax({repeat: -1, yoyo: true}); TimeLineMaster .add(TimeLineOne.play().duration(8), 0) // Play TimeLineOne animation - length 8 seconds .remove(cachedTweens) .add(TimeLineOne.reverse().duration(.5), 2) .remove(cachedTweens); // At 2 seconds of MasterTimline Play TimeLineOne animation in reverse - length .5 seconds
Play nested timeline a second time in master
in GSAP
Posted
Thank you both @Carl and @Shaun Gorneau.
After reading though documentation I had tried using "tweenTo" but didn't realize that was referencing the nested timeline versus master timeline - thanks for the guidance.
I will make sure to include a CodePen with questions in the future.