gigbig Posted March 8, 2013 Share Posted March 8, 2013 Hi, I have often stumbled on errors pointing to Greensock classes, on a certain misterious line that has appearantly nothing to do with the real problem, usually a missing/null object or an unknown property. Is there a way to handle errors (try-catch) caused by tweens? I'd like to know about a missing object before crashing into a GSAP class. Link to comment Share on other sites More sharing options...
GreenSock Posted March 8, 2013 Share Posted March 8, 2013 Unfortunately try/catch statements are incredibly slow, so it would kill performance in the tweening engine, and as I'm sure you know, top-notch performance is absolutely essential in a tweening engine. So no, we can't add try/catch statements inside the engine. Typically the only time you'll get an error with tweening is if you pass in a null reference as the target of the tween or if you're doing something 3D-related and then mixing that with a transform.matrix-related tween/plugin due to how Flash nulls the transform.matrix as soon as you apply any 3D effect. Of course you're welcome to add try/catch statements around your code that's creating tweens (not sure that'd help in your scenario). If you've got a specific problem, we'd be happy to help. Feel free to post a file that demonstrates the issue (the simpler the better). 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