beqa Posted August 22 Share Posted August 22 I have one timeline. inside div I have 3 divs ( position: absolute ) I am pushing animation objects in a array const anim = mainTimeline.from(...) animations.push(anim); but when I try to play animation on specific index, for example animations[2].play() it plays whole timeline is it possible to play only specific animation under same timeline? See the Pen RwENdGZ by -aisudhaskudh (@-aisudhaskudh) on CodePen Link to comment Share on other sites More sharing options...
Cassie Posted August 22 Share Posted August 22 Hiya! No you can't use control methods to control a tween on a timeline. You have to control the timeline as a whole. A way to play a section of a timeline would be to use tweenFromTo? https://greensock.com/docs/v3/GSAP/Timeline/tweenFromTo() This does seem a bit problematic for your situation though as your timeline is tied to scroll with scrub, so you can't really control it with play/pause. What is you goal here? Maybe we can advise? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now