Ridiculously SMALL Tweening Class

     Add to Technorati Favorites

Yo!Before launching the official Tweening Package (with proper Interfaces and classes to implement any kind of tweens, and of course with the default Basic Tweening classes).After 4 tween engine implementations I can say I acchieved sort of state of art in tweening matters. With past experience I:Found a class pattern that makes the tween system expandable to any kind of tweens (and can be implemented in virtually any language - actually I perfectly ported this to C#).Created a way to compact all Transition functions in order to reduce file size.Simplified the engine a lot in order to make the update operation as fast as possible.The result of this (besides the package) is a stupidly small tweening class!!The ByteTween static class eats only 1.7Kb of compiled clip! WIth this size it supports:

  • Creation of tweens of any numeric property (not color/uint propperties).
  • Pause,Unpause,Cancel operations based on the tween target and property.
  • Overlap system that cancel tweens of same property in order to avoid erroneous behaviour
  • 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!

The source file of ByteTween is in the Google Code of the Lighter project. In a few days I’ll created a proper project to all new classes that will come up!Together with the source you can find a ExmpleFile to see the creation of a simple tween!

GoogleCode Lighter Project

 ** Edit: I didn`t have much tim to test 100% this code. I have strong belief that it`s perfect but any issue report in the code.google interface!

One Response to “Ridiculously SMALL Tweening Class”

  1. chips zynga Says:

    im often bouncing all over the web the majority of the afternoon thus I choose to peruse a good deal, which unfortunately isn’t always a good factor as most of the internet websites I see are composed of useless crap copied from different websites a zillion times, nevertheless I gotta give you props this site is in actual fact half decent and also supplies a bit of original information, so cheers for breaking up the pattern of only copying other folks’ websites, if you ever wanna try a couple of hands of zynga poker together just hit me up - you have my email address :)

Leave a Reply