Home About Contact

Tiny and fast Tweening Platform for Flash Actionscript

Posted by phorner On April 20, 2009

greensock_logoTo be able to use Flash to it’s fullest, you need to be able to control animation (or tweening as it’s better known) from within Actionscript. There have been many solutions these last few years, with Tweener being the most well known and popular. Now comes a faster and smaller tweening platform: TweenLite. Written by Jack Doyle, this new tweening platform has taken everyone by surprise.

It comes in two different versions: TweenLite and TweenMax. The difference between the two is basically the level of functionality and the amount of features (TweenLite/Max features). TweenLite has less functionality and features, and therefore is smaller in file size (5k with default plugins). TweenLite is perfect for your more basic projects. TweenMax, has far more functionality and features, but the offset is the increased file size (14k with default plugins).

To keep file size small, TweenLite and TweenMax are broken up into plugins. Each plugin contains certain features like filter blurring, color transformation and bezier tweening to name a few. The great thing about using plugins is that you only include the plugins that you need to use for your project. This reduces your Flash file size and also helps speed up tweening.

TweenLite supports both AS2 and AS3. AS2 support is great for those who still need to work with Flash Player installs earlier than Flash Player 9, though obviously the speed is much slower. The AVM2 engine (AS3) is much more efficient in performance, and you can see this in the speed tests on Jack’s site.

Speaking of performance, Jack has also created a Speed Comparison which compares all the major Tweening Platforms against TweenLite. TweenLite is incredibly fast. You can see the Speed Comparison here.

The use of TweenLite is limited to projects and games that don’t charge end users money. You can also donate to help keep Jack in development of TweenLite. The amount you donate determines which plugins you can use in your projects as not all plugins come standard with TweenLite/Max.

Having read Jack’s blog recently, it seems that several Tweening Platforms (Twease and gTween) will be merging with TweenLite/Max. This is great news as TweenLite will benefit from the coorporation of the developers.

The latest stable version is Version 10, with Version 11 Beta in the works. Some of the new features from Version 11 Beta are:

  • the addition of the “TimelineLite” and “TimelineMax” classes. They make building and managing sequences/groups of tweens simple.
  • useFrames” feature.
  • a new “motionBlur” plugin that applies a realistic directional blur based on the velocity and angle of a DisplayObject’s x/y movement.
  • a new “dynamicProps” plugin that allows you to associate a function with a property so that every time the tween is updated, it calls that function to get the end value for the associated property.

Having used TweenLite, I can vouch for it’s speed and size. All the signs for this project look very promising and I look forward to seeing how it develops over the coming months. Great work Jack!

For more information: GreenSock Tweening Platform

Share