AS3 Tween Engines Getting Lighter with GTweeny, ByteTween, TweenLite and TweensyZero

Recently two compact tweening engines have been released. Grant Skinner’s GTweeny and laborat’s ByteTween. This adds to the two that focus on micro-tween kit sizes in TweenLite and TweensyZero

Basically these engines look to be micro and provide pretty nice features while being so small. Micro tweening engines like GTweeny (3k), ByteTween (1.7k), TweenLite (2.7k), TweensyZero (2.9k) and Tweener (9k) have varying levels of support of features (Tweener being the most loaded with color and filter support without other kits just init, also TweenLite with a nice configurator to include only what you need).  Micro kits have benefits when used for banners, animated assets (where you have many assets and the per asset savings is worthwhile) and other places you just want really small output.

Light Transition ByteTween

(1.7k)

This kit has a c# version as well as a small as3 bytetween version.

The ByteTween static class eats only 1.7K of compiled clip! With this size it supports:

  • Creation of tweens of any numeric property (not color/uint properties).
  • Pause,Unpause,Cancel operations based on the tween target and property.
  • Overlap system that cancel tweens of same property in order to avoid erroneous behavior
  • Alpha tween with negative alpha support (negative alpha sets the MovieClip visibility to false)
  • ’scale’ tween of both ’scaleX’ and ’scaleY’ properties.
  • OnComplete callback with any number of parameters
  • Easy interface for creating new tweens!

Download light_transition_CS_0.5a.zip.zip (c# version)

Download thelab_ByteTween.zip

TweenLite

(2.7k) base

  • SPEED – I’m not aware of any popular tweening engine with a similar feature set that’s as fast as TweenLite. See the speed comparisons yourself.
  • Feature set – In addition to tweening ANY numeric property of ANY object, TweenLite can tween filters, hex colors, volume, tint, saturation, contrast, frames, and even do bezier tweening, plus LOTS more. TweenMax extends TweenLite and adds even more capabilities like pause/resume, rounding, event listeners, timeScale, and more. Overwrite management is an important consideration for a tweening engine as well which is another area where the GreenSock tweening platform shines. You have options for AUTO overwriting or you can manually define how each tween will handle overlapping tweens of the same object.
  • Expandability – With its new plugin architecture, you can activate as many (or as few) features as your project requires. Or write your own plugin if you need a feature that’s unavailable. Minimize bloat, and maximize performance.
  • Management featuresTweenGroup makes it surprisingly simple to create complex sequences and groups of TweenLite/Max tweens that you can pause(), resume(), restart(), or reverse(). You can even tween a TweenGroup’s “progress” property to fastforward or rewind the entire group/sequence.
  • Ease of use – Designers and Developers alike rave about how intuitive the GreenSock tweening platform is.
  • Updates – Frequent updates and feature additions make the GreenSock tweening platform reliable and robust.
  • AS2 and AS3 – Most other engines are only developed for AS2 or AS3 but not both.

Download TweenLite

TweensyZero

(2.9k) base

Here are some simple steps to help you get started with creating your first animations with TweensyZero. TweensyZero is a light weight version of Tweensy most core features found in Tweensy are available to TweensyZero. Documentation for TweensyZero can be found under the folder ‘documentation/zero’ or online

Download TweensyZero

gTweeny

(3k)

gTweeny is gTween‘s lightweight younger sibling. It strips a lot of the secondary features of GTween (proxy, timing modes, etc) in favour of smaller file size. It is currently under 3kb…

Download gTweeny

Here is a list of all open AS3 “Micro” Tweening engines < 5k

Here is a list of all open AS3 Tweening engines and base kits

The decision on which to use can be affected be features you want, how it feels (many use the same object syntax so it is dynamic), what performance do they have (all are orders of magnitude faster than the built in tween (flash) or transitions (mx/flex)), which size is ok, author/community support needed (some are more active than others adding features or simplifying and tweaking performance methodically), and many other factors.  There are definitely plenty to choose from.

Speed Tests for many Tween Engines

For more on each features see their sites or these previous lists on tweening engines:

Tags: , , , , , , , , , , , , , ,

  • PeZ

    You may also have a look at Tweensy ;)

  • http://revelations2.com AmaDiver

    Great write-up — I’ve been poking around Google Code to find Tweening packages, and you dug up two I hadn’t seen before. I second PeZ’s suggestion to take a look at Tweensy ( it’s got some really great demos, and Shane’s done a great job introducing a new Tween engine into an already robust market ).

  • http://drawk.com drawk

    Updated to include the complete set of micro tweening engines. Added TweensyZero and TweenLite with it’s new plugin config that allows you to set only what you need in your kit.

  • http://flashspeaksactionscript.com Angel Romero

    Nice Roundup…there are so many great things to consider when handling these tween engines. Personally, I like the innovative features Grant’s gTween is offering. While it is still in its beta state, it comes equipped with some mighty sweet features.

  • http://performancechips.co.cc Auto Performance

    I did not expect this on a Friday. this is going to be fun…. Added your site to my RSS reader.

  • http://www.thelaborat.org Eduardo

    It would be nice if th e Moses perfomance profiler be updated with the new tween engines!

  • http://sdfsdf Gortex

    If you can’t write your own tweening engine in a day you should be working at mcdonalds. The obsession with tweening is an embarrassment to the entire flash community.

    • http://drawk.com drawk

      Gortex, I agree but at this point we have enough custom tween engines. The idea is that we want standardized tweening in some ways and this helps. Before AS3 for instance everyone implemented these as their own, and some do in AS3 as well. As a programmer you should be able to, as an architect you want others to standardize on formats so you can take it to the next level and build platforms on that. Standards are what make platforms great and able to innovate on top of, exhibit a: the internet.

  • Scottae

    You marked TweenLite as the one with the best speed. Have you checked out the demo for Tweensy? It looks like Tweensy is pretty fast.

    http://www.flashdynamix.com/examples/Tweensy/0.2/SuperRenderTweenTest.html

  • http://blog.greensock.com Jack

    Scottae, the comparison you linked to isn’t quite apples-to-apples because he pushes the Tweensy stuff into a BitmapLayer but leaves TweenLite/Max tweening the raw objects, so the apparent speed improvement is really the result of Flash not having to render the overlapping objects in the normal display list. It’s more a measure of rendering performance between a single Bitmap vs. thousands of overlapping objects rather than the tweening engines themselves. When tweening massive amounts of overlapping DisplayObjects that all share the same parent, it’s a great technique, but keep in mind that there are trade offs and limitations that may not be acceptable in your project. The tests on the Tweensy site are using an old/stale version of TweenMax that was definitely slower than the newest release (http://www.TweenMax.com). Don’t get me wrong – Shane has done a great job of building a fast, capable engine. I’d encourage everyone to do their own real-world tests, though. http://blog.greensock.com/tweening-speed-test/ seems to be a more apples-to-apples comparison and [at least on my machine] TweenLite is indeed fastest.

    Gortex, a competent, full-featured tweening engine takes a heck of a lot more than a day to build. Look at how long it took a brilliant guy like Grant Skinner or any of the other authors. Sure, it’s not hard to build an ENTER_FRAME loop or timer that updates values, but a full-fledged engine that manages overwriting, sequencing, optimizes speed, etc. is much more involved. There are many pitfalls to avoid. If you prefer rolling your own, though, more power to you.