[Tweener] Tweener 1.33.74

Zeh Fernando zeh at zehfernando.com
Tue Jun 9 19:27:46 PDT 2009


List, Makc, et al,
After talking to a few other friends who also provided some constructive
feedback, I realized the change added by Tweener 1.32.74 - making tweening
overwrite optional, and off by default (as opposed to enforced to true as it
was before) - was a mistake. While my decision to do so was based on what I
believe is a better overall design, I failed to see the problems it'd cause
for people who wanted to update not knowing whether (or where) their code
would brake. While I sort of thought to myself "hey, they can just ignore
the update", I guess enforcing people to use a certain version for legacy
code isn't the best solution and it could cause a bit of pain had it became
the official last version.

So, sorry.

In the hops of making up for it, I've just updated the SVN and the
documentation with Tweener version 1.33.74. This version makes two important
changes: first, it adds a new static property called "autoOverwrite" which
dictates the default value of the "overwrite" parameter. Second, the default
value of "autoOverwrite" is true, that is, by default, it just goes back to
how versions of Tweener worked before the overwrite parameter was added.

This means that updating from any "stable" version to 1.33.74, a project
should continue to work as usual, with overwrites by default.

The difference is now you can define how it'll work with the optional
autoOverwrite property, or still with the overwrite parameter.

To sum it up in code:

// Tween is overwritten
Tweener.addTween(myBox, {x:400, time:4, transition:"linear"});
Tweener.addTween(myBox, {x:100, time:2, transition:"linear"});

// Tween is not overwritten
Tweener.autoOverwrite = false;
Tweener.addTween(myBox, {x:400, time:4, transition:"linear"});
Tweener.addTween(myBox, {x:100, time:2, transition:"linear"});

// Tween is not overwritten
Tweener.addTween(myBox, {x:400, time:4, transition:"linear"});
Tweener.addTween(myBox, {x:100, time:2, transition:"linear",
overwrite:false});

// Tween is overwritten
Tweener.autoOverwrite = false;
Tweener.addTween(myBox, {x:400, time:4, transition:"linear"});
Tweener.addTween(myBox, {x:100, time:2, transition:"linear",
overwrite:true});

The advantage of not using overwritten tweens is that it's much faster
because it won't check whether there's something to write or not. So if
you're creating hundreds of tweens in a loop, using "overwrite:false" will
make it faster.

AS2 FL7, AS2, AS3, and AS3 versions are tested and updated on the SVN
server. I actually wanted to upload those last sunday, but I had a severe
system crash and it was only today that I was able to finally reinstall
eclipse, Flash, and TortoiseSVN. Let me know if anyone runs into any error.

Unless there's something I've inadvertedly broken that needs to be fixed,
this version will be 'stable' and added to the download list next week when
I finally post the Tweener post-mortem article I wrote.


Zeh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/attachments/20090609/b7fb7656/attachment.htm>


More information about the Tweener mailing list