Share Posted August 3, 2014 I don't know. What am I doing wrong? My code is essentially like this: var tl = new TimelineMax({paused:true}) tl.to($("#pin"), 1, {x:455,y:198, onComplete:myFunction, onCompleteParams:["params"]}) .addLabel("play_from_here") .to($("#pin"), 1, {x:737,y:307}) tl.play(play_from_here) using play(), resume(), seek(), it doesn't matter, it always trigger all events on the way. Link to comment Share on other sites More sharing options...
Author Share Posted August 3, 2014 And using call(myfunction) instead of oncomplete event, do the same. Link to comment Share on other sites More sharing options...
Share Posted August 4, 2014 Hi Giovani and welcome to the GreenSock forums. Some methods, seek() among them, have a second parameter, a boolean to be more specific, which indicates whether callbacks should be ignored or not. By default this is false, so the engine should ignore any callbacks during the seek, so your code should work as you expected. http://api.greensock.com/js/com/greensock/core/Animation.html#seek() So there's two thing to consider, first be sure that you're using the latest version of the engine and second please provide a reduced sample in codepen in order to see what could be the issue: http://forums.greensock.com/topic/9002-read-this-first-how-to-create-a-codepen-demo/ Rodrigo. 1 Link to comment Share on other sites More sharing options...
Share Posted August 4, 2014 Thanks, Rodrigo. It seems though that Giovani did uncover a regression that slipped in with version 1.12.0. The short story is that when tweens that weren't yet initialized were sent off to be "lazy" rendered, their events were not being suppressed properly. The good news is, there is now a fix in place in version 1.13.2 (attached) Giovani, Sorry for the hassle and thanks for reporting the issue. Here is a very basic CodePen example that uses a pre-release of 1.13.2. http://codepen.io/GreenSock/pen/c89d9dcd4a95817dcaa0fb099a290a58?editors=001 Very similar to your code and you will see that events are now properly being suppressed. Please grab the pre-release version of 1.13.2 (below) and test with your code. If you find errors, please fork the codepen demo I provided so that we can quickly hunt them down. We've tested and I'm confident it should work properly. Thanks and sorry again for the trouble. Edit: in methods like pause(), play(), seek(), time() the suppressEvents parameter is true by default. TweenMax-1-13-2-preview.js.zip 1 Link to comment Share on other sites More sharing options...
Author Share Posted August 4, 2014 What I am doing is basically like that: See the Pen FbozA by anon (@anon) on CodePen But after a couple of non sleeping nights, I figured out that using the version 1.11.0 it doesn't happen Both seek("myLabel") and play("myLabel") suppress the events like expected. Link to comment Share on other sites More sharing options...
Author Share Posted August 4, 2014 Thank you, it's working fine with 1.13.2 2 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