Share Posted October 21, 2015 I'm new to GSAP so I'm sure I'm doing something wrong. I have the beginning of a game I'm working on: www.giebler.com/IMS/iWin/Game/Game2.html (My graphic designer hasn't animated the avatar yet). While working on it, a tap or click of the mouse executes tl.restart() so I can repeat the animation. However, after a few restarts, the avatar stops at the bridge for several of the timeline events, but eventually jumps to the end. Can someone look at my source (above URL) and tell me what I'm doing wrong? Thanks! Link to post Share on other sites
Share Posted October 21, 2015 Hi and welcome to the GreenSock forums. The only thing that jumped out in your code is that you are using a bad syntax for the position parameter. relative string values should be "+=1.5" not "+1.5" Not really sure that is related but its difficult for me to test, which is why we recommend that you provide a simplified CodePen demo: http://greensock.com/forums/topic/9002-read-this-first-how-to-create-a-codepen-demo/ You should be able to paste your timeline code into a pen and just use simple, colored divs for map and avatar. The less code the better. 3 Link to post Share on other sites
Author Share Posted October 22, 2015 Hi Carl, Thanks for the suggestion. I modified all of my absolute times to relative times using the format you provided, but the animation still messes up when calling restart(). I decided to take a different approach, not using restart(), by creating a new instance each time I want to restart the animation. That is working perfectly, so I'll just avoid using restart() in my code. Thanks, Gary Link to post Share on other sites