Share Posted June 4, 2018 Hi all, Im having trouble triggering my 'slideshow', i got the basics working with the timeline, but whenever i restart it, the 'x : ''-='' doenst add the amount, but starts from the previous x value. I have a 'activeCount' variable running, which disables the buttons when the max amount of slides is reached. This part works fine in the console, but ofcourse not really visible when the timeline isn't working correctly. Can someone help me with this? Cheers. See the Pen jKWQGa by chrissnoek (@chrissnoek) on CodePen Link to comment Share on other sites More sharing options...
Share Posted June 4, 2018 Hi @sirhc, it's because your restarting the same timelines with values that were calculated at the start. To introduce new values, you can use a function based value for `x` or you can just make these Tweens within the `onclick` handler rather than Timelines. See the Pen oybJOG?editors=1111 by sgorneau (@sgorneau) on CodePen Edit: CodePen fixed 2 Link to comment Share on other sites More sharing options...
Share Posted June 4, 2018 My CodePen is botched ... I’ll fix it up and repost in a few Link to comment Share on other sites More sharing options...
Author Share Posted June 4, 2018 @Shaun Gorneau Thanks a ton, got it working myself! See the Pen RJrdzo by chrissnoek (@chrissnoek) on CodePen 2 Link to comment Share on other sites More sharing options...
Share Posted June 4, 2018 1 hour ago, sirhc said: @Shaun Gorneau Thanks a ton, got it working myself! See the Pen RJrdzo by chrissnoek (@chrissnoek) on CodePen OK, great! I have updated the embedded pen (I somehow forked multiple times and it got messed up ... should have had coffee before I started ) But, I'm glad you got it figured out! 1 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