[Golist] Using Go w/HydroTween
Moses Gunesch
moses at goasap.org
Thu Jan 17 13:40:57 PST 2008
... but i also like that Donovan put a static method called go() that
automates it like a tween engine as well.
Yo Donovan –– I added a way to set props after the fact.. if it's okay
with you I'll post the file to this list?
- m
On Jan 17, 2008, at 3:06 PM, Moses Gunesch wrote:
> I mentioned that I'd used Go to script a stop-motion animation
> player, which worked great, but hilariously I haven't had a need in
> my project to run any normal tweens, until just yesterday!
>
> So I grabbed Donovan's all purpose tween class, HydroTween, which
> works a lot like Tweener syntax-wise. I had no problems with it
> whatsoever! It was easy... as easy as any other tween engine. Thanks
> Donovan! (available at his Hydrotik.com blog)
>
> Personally for AS3, I like being able to make a tween that you can
> store in a class. I had an animation of a big tab that slides up and
> down for it's show / hide. So instead of making a new tween every
> time, I simply stored one tween as a private class property, then
> run stop(), reset the position and call start() on it to use it.
> Very simple!
>
> I also like this because as3 makes you think about memory management
> and object creation....
>
> Every time you create a callback or event in as3 you're creating a
> method-closure object internally that stores tons of references to
> its surroundings, so they're a bit more prone to memory leaks than
> other features of the language. Object creation also takes time and
> processing. So, having a single tween object in memory with a single
> method-closure reduces the processor hit quite a bit compared to the
> normal actions of a sealed tween engine (which generates and
> destroys new tween instances and closures constantly as it runs).
>
> Go exposes the engine so that you have control over whether you want
> to make a helper class (a la Tweener) to manage tweens for you, or
> whether you want to keep control over them as I did in this example
> and minimize what takes place behind the scenes.
>
> - moses
>
> _______________________________________________
> GoList mailing list
> GoList at goasap.org
> http://goasap.org/mailman/listinfo/golist_goasap.org
More information about the GoList
mailing list