Share Posted December 15, 2012 Hi all, I wanted to know how the EndArrayPlugin is different from the regular TweenLite? Comparing: var myArray:Array = [1,2,3,4]; TweenLite.to(myArray, 1.5, [10,20,30,40]); And the alternate EndArray syntax: var myArray:Array = [1,2,3,4]; TweenLite.to(myArray, 1.5, {endArray:[10,20,30,40]}); How would that be different? And I looked at the code in EndArrayPlugin, it supports round on/off which TweenLite does not? Is that the only difference or is there more? They both work, I've tested them. Link to comment Share on other sites More sharing options...
Share Posted December 16, 2012 Technically that first tween is malformed - the vars object is supposed to be a generic object with enumerative properties, but your example works nevertheless. What happens if you want an onUpdate or onComplete? That would be impossible if you pass a raw array as the vars parameter. So yes, using the EndArrayPlugin allows you to not only tap into all the other features of the tweening engine (like setting an ease, using callbacks, etc.) but it also does work with RoundPropsPlugin. 1 Link to comment Share on other sites More sharing options...
Author Share Posted December 16, 2012 Sorry to sound dumb, but the EndArray plugin only works with rounding, it has no other benefits? Apart from the better syntax? Thanks for the quick replies, Jack. Link to comment Share on other sites More sharing options...
Share Posted December 16, 2012 No, it's not just rounding - it also permits you to use onComplete, onUpdate, onstart, onreverseComplete, ease, delay, useFrames, overwrite, etc. Plus it uses proper syntax. But besides that, there are no benefits Link to comment Share on other sites More sharing options...
Author Share Posted December 17, 2012 Nice. Thanks a ton jack. 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