GTween beta 4: Tweening Library

GTween beta 4 has been released! This is the final beta of the library, and I am only keeping it beta for this release because there is a chance I will toy with the API a little bit more, and I’d like to clean up the demos before final (right now they are an ugly mix of demo and test file).

The main new feature in this release is a more robust synchronization model which allows you to synchronize child tweens to the delay, beginning, end or duration of its parent. This release also includes the GTweenFilter class (<0.5kb) which a number of people have been patiently waiting for. I also patched a number of bugs, added a few more simple demos, and created a MultiTween class that allows you to tween multiple objects to either the same destination property values, or different values using a single tween instance. Both of the new classes should be useful, but they are also there to serve as templates for people interested in writing their own extensions to GTween. They are not required to work with GTween normally - still just a single class. Here is the full list of changes:

  • fixed a bug with autoHide (thanks to JTtheGeek)
  • fixed a bug with useSmartRotation and destination values over 360 (thanks to radicalFish)
  • added propertyTarget and getPropertyTarget(), to support GTweenFilter and other potential subclasses
  • renamed the static “ticker” property to “activeTicker” to prevent issues in some editors due to it being named the same as the instance property. (thanks to Thomas Brekelmans)
  • fixed a problem with progressPoints set to a position of 0 not firing (thanks to Toby Skinner)
  • moved event meta tags to before class declaration, so they show up properly in the API documentation (thanks to Jordi Boggiano)
  • updated .clone() to support .useSetSize and .useSnapping properties
  • modified .addChild() to accept GTween.TWEEN_PHASE, GTween.END, GTween.DURATION, GTween.BEGINNING as a second parameter, allow more complex synchronization options.
  • included GTweenFilter and MultiTween in package.

As always, you can view the latest documentation, and download the latest version of the library at gskinner.com/libraries/gtween/.

Grant Skinner

The "g" in gskinner. Also the "skinner".

@gskinner

11 Comments

  1. Thanks for your efforts on creating this great library!

  2. Grant, is there any plans to produce a set of easing classes? When you create a new ActionScript project in Flex you don’t have access to any of the Flex or Flash easing classes as default.

    Thanks in advance,

    Mark

  3. I hadn’t intended to provide any easing classes. There are already a ton of them out there, and there’s no real way to improve on them.

    I might look into the licensing on some of them to see if I can redistribute them with GTween.

  4. Joshua Sullivan December 22, 2008 at 8:35pm

    I don’t know if this is considered a bug or not, but when I call gTweenInstance.beginning() before the tween has had a chance to play (due to a delay or autoPlay:false) then I get an error because initProperties is null.

  5. @Grant, Thanks for getting back to me, that would be really helpful if they were distributed with it (just for ease of use).

    Keep up the good work, it’s a brilliant tweening engine with a lot of handy features!

  6. Hi there!

    Grant, I’ve using GTweener for 2 weeks and very happy with it, thanks very much!

    Not until now I had to use the autoReverse property and I was surprised about how it works. I was expecting it would repeat just once whereas it repeats forever.

    Wouldn’t be more flexible adding something like:

    tween.autoReverse = 1;

    So people could define for how long it should repeat (and use 0 as forever)? I’ve taken a look to the code and I think I can implement this myself, but would love to see it in the official release.

    Would you accept a patch for it?

    Thanks again!

    Juan

  7. Zarate,

    Feel free to extend GTween, and send me any additions you think would be useful for everyone. At some point in the not too distant future I will put GTween on google code and let people contribute to it openly.

    Cheers.

  8. I’ve just sent an email to info@gskinner.com with the patch and a little explanation, I hope it’s ok!

    Cheers!

    Juan

  9. hi,

    just finished the intro for my website using GTween 4 and five3D. Thank you, Grant, huge help!

  10. Hi Grant,

    I have a question regarding the optimization of my animation. If you visit my page http://www.solidpitch.com/ you’ll see (i hope :)) a set of four small movies that get animated using your GTween4. The thing is: i notice all the time a small break in the movement. What would be your advice? Is that too much of a processing for Flash player in general? I have 4 Video3D objects playing and moving around. Where should I look for extra juice? 🙂 I actually set the tweens to be “Linear” hoping the calculations will take less effort.

    Thank you again,

    Dragos

  11. oya….tolong bantuin q donk?

    he…he…oya klu ada materi baru ttg animasi 2D tlg kirimke ke e-mailq yach….Gbu

Leave a Reply

Your email address will not be published. Required fields are marked *