Share Posted November 28, 2015 I'm going to assume I've missed something I'll be blushing for in a few minutes, but I've been banging my head against this and just can't work it out. All I am attempting to do, is call a function via the onRepeat callback when it is applied to a tween in a yoyo repeat state.I've tried numerous variations of the code and can confirm that if I use onComplete, the callback works, and if I use onRepeat on the timeline rather than a tween, then that also works but that's no use to me as I need to call multiple callbacks on separate tweens. I'm sure this is something very simple but for the life of me I can't work it out, if people could check out the codepen and let me know what's wrong, that would be great. See the Pen VvJOMQ?editors=001 by OneManLaptop (@OneManLaptop) on CodePen Link to post Share on other sites
Solution Share Posted November 28, 2015 thanks for the demo, very helpful. onRepeat callbacks will only be applied if the tween also has a repeat property like so: tl.to('div',2,{ y:100, ease:Elastic.easeOut.config(1.1, 0.4), repeat:1, onRepeat:testTwo }); http://codepen.io/GreenSock/pen/xwvGyL?editors=001 you weren't telling your tweens how many times they should repeat and thus they weren't repeating and the callback had no need to execute. an onRepeat callback on a tween is completely un-related to what happens when the timeline repeats. Hopefully this helps. If you need some other behavior, please let us know. 3 Link to post Share on other sites
Author Share Posted November 28, 2015 Cheers Carl, that's certainly fixed it and it's prompted me to brush up on the details of the tween / timeline relationship. Thanks for your fast and thorough help as always. Link to post Share on other sites