Share Posted November 6, 2014 I am using TimelineMax to create a sort of comic that the user can step through. At the end of each sequence of animations, I have a label to indicate the completion of a scene, a pause, and a triggerEvent function that lets my application know that we now need user interaction to continue (typically, to display a next button). Unfortunately, when the user clicks the "next" button to continue (which simply calls the play() method of the timeline), the triggerEvent function fires again, because the playhead was paused at that same frame. There are a number of solutions I am considering so that the triggerEvent function doesn't fire on play, but I wanted to first find out from folks here if there is another way I should be approaching this that is more obvious (as is frequently the case). Thanks in Advance, Frank See the Pen cJbFy by frankrue (@frankrue) on CodePen 1 Link to post Share on other sites
Solution Share Posted November 6, 2014 Hi and welcome to the GreenSock forums. Thanks so much for the demo. It was perfect. Wish everyone made their issues so clear. Great job. You can get around the issue of the callback firing both when paused and played if you add the callback to the addPause() like so tl.addPause("+=0", triggerEvent, ["scene1Done"]); Demo: http://codepen.io/GreenSock/pen/aGlAs Is that a suitable solution? 3 Link to post Share on other sites
Author Share Posted November 6, 2014 Carl - Thanks, and thanks for the compliment. This will work perfectly, as it prevents any significant additional workarounds. I always like it when there's a way to do it without a "hack". Haha. Thanks, Frank Link to post Share on other sites