antonis Posted November 11, 2020 Share Posted November 11, 2020 Hello all, My code should execute a loop moving the box left and right and after some time it should move it all the way right and finish the timeline. I wrote the following code and some times it fails to seek the label "end" and stucks in a loop... console keep printing the "end" infinty and the box is not on the right as it should be, as you can see from my screenshot below. If you hit RUN a couple of times you may see it. I am using Chrome Version 86.0.4240.193 (Official Build) (64-bit) on linux See the Pen oNLQVZQ by codedgr (@codedgr) on CodePen Link to comment Share on other sites More sharing options...
Solution ZachSaucier Posted November 11, 2020 Solution Share Posted November 11, 2020 Hey antonis and welcome to the GreenSock forums. I would set up the logic a little differently. Instead of trying to seek to the label that is at the same time as the .add(), why not just only seek if times is 'first'? Like this: See the Pen MWezMGE?editors=0010 by GreenSock (@GreenSock) on CodePen Also we recommend the modern syntax. 2 Link to comment Share on other sites More sharing options...
antonis Posted November 11, 2020 Author Share Posted November 11, 2020 Thank you for the quick reply.. that solves the issue.. 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