Share Posted January 5, 2017 hi guys i have a TimelineMax timeline set up, tweening a spritesheet with about 300 frames. it's working great, tweening from 1 label to another. but when i add an onStart param: tl.tweenFromTo("region1", "region2", { onStart: clearMarkers }).duration(0.75); i get this error: Uncaught RangeError: Maximum call stack size exceeded at Object.g.onStart (tweenmax_1.18.5_23b0de6…_min.js:14) at Object.g._callback (tweenmax_1.18.5_23b0de6…_min.js:16) at Object.g.onStart (tweenmax_1.18.5_23b0de6…_min.js:14) at Object.g._callback (tweenmax_1.18.5_23b0de6…_min.js:16) at Object.g.onStart (tweenmax_1.18.5_23b0de6…_min.js:14) at Object.g._callback (tweenmax_1.18.5_23b0de6…_min.js:16) at Object.g.onStart (tweenmax_1.18.5_23b0de6…_min.js:14) at Object.g._callback (tweenmax_1.18.5_23b0de6…_min.js:16) at Object.g.onStart (tweenmax_1.18.5_23b0de6…_min.js:14) at Object.g._callback (tweenmax_1.18.5_23b0de6…_min.js:16) i'm guessing the 300 frames has something to do with it, but i would think that this tweenFromTo() would only be called once and should be ok. any ideas why this is happening and how i can fix it? thanks! Link to comment Share on other sites More sharing options...
Share Posted January 5, 2017 HI split19 That usually means you have a recursive loop somewhere. What does your your clearMarkers function do? 1 Link to comment Share on other sites More sharing options...
Author Share Posted January 5, 2017 Hi @PointC i removed everything from clearMarkers(). it's empty. Link to comment Share on other sites More sharing options...
Share Posted January 5, 2017 Hello split19 and Welcome to the GreenSock Forum! What browser and browser version you seeing this in? What OS and OS version you seeing this in? Could you please make a limited codepen to make sure we can see all of your code in context. Also make sure you are using the latest version 1.9.0 of TweenMax.min.js https://cdnjs.cloudflare.com/ajax/libs/gsap/1.19.0/TweenMax.min.js Thanks 1 Link to comment Share on other sites More sharing options...
Author Share Posted January 5, 2017 thanks for the help guys! Here's the See the Pen OWPEVV by split319 (@split319) on CodePen . Link to comment Share on other sites More sharing options...
Author Share Posted January 5, 2017 oh and to answer your questions, @Jonathan: latest Chrome on latest MacOS. Link to comment Share on other sites More sharing options...
Share Posted January 5, 2017 Please standby while we look into this. Thank you for the codpen! 1 Link to comment Share on other sites More sharing options...
Share Posted January 5, 2017 hmmmm... I'm confused by this myself. I've recreated the behavior you're seeing in this pen: See the Pen 3d2e405f888df24587e8d197a9fd1a1e by PointC (@PointC) on CodePen I don't think I've used an onStart in the vars of a tweenFromTo, but I've used an onComplete and delay with no problems. If you switch my demo to an onComplete, it all works fine, but that onStart is causing trouble. Unless Jonathan has some more ideas, we may have to kick this one upstairs to Professor Carl or Master Jack. Link to comment Share on other sites More sharing options...
Share Posted January 5, 2017 Thanks, Craig, I just got done with my own reduced case. Definitely something we need to look into. Split1, nothing wrong with your code. While we look into please try adding a callback to your timeline at a time of 0 like this: var autoplay_tl = new TimelineMax(); autoplay_tl.add(clearMarkers, 0) autoplay_tl.add( window.tl.tweenFromTo("region1", "region2", { ease: Power1.easeInOut }).duration(0.75) ); autoplay_tl.add( window.tl.tweenFromTo("region2", "region3", { ease: Power1.easeInOut, delay: 1}).duration(0.75) ); autoplay_tl.add( window.tl.tweenFromTo("region3", "region4", { ease: Power1.easeInOut, delay: 1}).duration(0.75) ); ... I think that should give you the results you need in the meantime. Sorry for the confustion. Thanks for bringing this to our attention. 1 Link to comment Share on other sites More sharing options...
Share Posted January 5, 2017 Sorry about that! You're absolutely right and it should be fixed in the upcoming 1.19.1 release which you can preview (uncompressed) at https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/TweenMax-latest-beta.js Better? 3 Link to comment Share on other sites More sharing options...
Share Posted January 5, 2017 Dropped it into my pen and it's perfect now. 2 Link to comment Share on other sites More sharing options...
Author Share Posted January 5, 2017 Thanks everyone! I really appreciate it. i changed the library URL to the 1.19.1 URL and it works. when the globe stops on a region, i'm dropping some markers on some cities (not shown in my pen). so since i need to do clearMarkers() at the start of every tweenFromTo() when the globe starts animating again, i added this after each tween, to simulate onStart: autoplay_tl.add(clearMarkers, "-=0.75"); seems to be a good workaround for now: autoplay_tl.add(window.tl.tweenFromTo("region1", "region2", { ease: Power1.easeInOut, onComplete: dropMarkers, onCompleteParams: [markers_region2_mc] }).duration(0.75)); autoplay_tl.add(clearMarkers, "-=0.75"); autoplay_tl.add(window.tl.tweenFromTo("region2", "region3", { ease: Power1.easeInOut, onComplete: dropMarkers, onCompleteParams: [markers_region3_mc], delay: 2}).duration(0.75)); autoplay_tl.add(clearMarkers, "-=0.75"); autoplay_tl.add(window.tl.tweenFromTo("region3", "region4", { ease: Power1.easeInOut, delay: 2}).duration(0.75)); autoplay_tl.add(clearMarkers, "-=0.75"); autoplay_tl.add(window.tl.tweenFromTo("region4", "region1b", { ease: Power1.easeInOut, delay: 2, onComplete: function () { window.tl.seek("region1"); console.log("reset"); } }).duration(2)); autoplay_tl.add(clearMarkers, "-=0.75"); autoplay_tl.add(window.tl.tweenFromTo("region1", "region2", { ease: Power1.easeInOut, delay: 2 }).duration(0.75)); Jack - a related question: when you release v 1.19.1, will it get updated on Google's CDN, listed here? my code is part of a banner that will be served by DoubleClick. thank you! 1 Link to comment Share on other sites More sharing options...
Share Posted January 5, 2017 Yep, your solution seems entirely reasonable. As for 1.19.1 being updated on Google's CDN, I'm not exactly sure when they'll do that. I hope to release 1.19.1 within the next week or two, but sometimes these big companies take a while to get around to pushing updates to their CDNs. We can certainly let them know about the update (and we'd encourage their customers like you to do so as well to make sure they see how much demand there is). Google is usually pretty good about doing it within a few weeks or a month. Again, sorry about the hassle. Link to comment Share on other sites More sharing options...
Author Share Posted January 5, 2017 Hi @GreenSock. Thanks for your quick reply. The workaround will be fine for this one, but I'll keep an eye out for the updated version on the CDN. Thanks for your amazing tools! 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