- Versatility – Great for tweening animation, yes, but also great for calling functions, disptaching events, playing sounds, controlling MovieClips, and more. Virtually any code can be run at a specific time. In KitchenSync, any event or behaviour that can be sequenced is called an “action“.
- Advanced sequencing – There are several types of action groups designed to meet the real-world sequencing needs of projects.
- Interchangeable groups – Treats all actions, including groups of actions (like sequences), as the same type of object so they can be interchanged. That means you can nest sequences inside of other sequences.
- Video-like controls – All actions, even groups, have the ability to play, pause, stop, reset, play backwards, loop, and jump to a specific time. Calling one of these functions on a group affects all of the items in the group.
- Beyond Penner – All the familiar easing functions are included as well as several original ones like oscillators. An easing utility class has also been added which allows you to create hybrid easing functions.
- Lots of events – Events are dispatched throughout the lifetime of an action including when it is started, paused, and completed.
- Timeline tweening – Set up a complicated animation on the timeline then control it using a tween object. From KitchenSync you can change the duration of the animation, the easing function, or play it backwards.
- Flexible tweens – Tweens are split into two classes. One for timing and easing (KSTween) and one for controlling values (ITweenTarget). This allows you to tween complex values (such as filters, timelines, colors) without using a separate tween class for each application. Factory classes help you create the tween you need.
- Tween any property – The default tween target, TargetProperty, controls any numeric property of any object, not just a preset list of MovieClip properties. Among other things, that means it can be used in conjunction with other libraries like PaperVision3D.
- Customizable actions – Actions have many tweakable properties like snapping and synching. Default values can be controlled in a centralized location.
- Convenient cloning – Any action can be easily cloned and modified with the clone() method.
- Optional Synchronizing – All actions have the option of playing back in ‘sync mode‘ which will keep your animations in sync with sounds or timers even if the frame rate drops. Or turn this mode off to ensure there are no dropped frames.
- Built-in Command queue – KSSequenceGroup objects, when combined with KSFunction and KSAsynchronousFunction objects, can act as a built-in command queue. This allows you to build a list of functions and other actions that need to be run in a certain order then execute them all at once.
- Easy time parsing – Time string parsing makes it incredibly easy to set times using any units you like. Frames, milliseconds, seconds, minutes, hours, even years and abbreviations for each are all supported. Even timecode format (hh:mm:ss;ff) will work.
- OOP – Super-tight object-oriented design makes the code very easy to extend and customize. Tweens are created as individual objects instead of handled by a static method. Like to name-drop design patterns? We got factory, composite, command, strategy, and of course, singletons to name a few.
- Descriptive syntax and lots of documentation – Initializing the engine takes one line of code. One more line and your’re tweening. Exhaustive documentation in the wiki and asdocs will help you through the rest.
- Speed – Tween performance for KitchenSync is competitive with the other major tweening engines like tweener. A very easy to use framerate calculator class is included to help you tweak performance.
- Small file size – KitchenSync is about 10-20KB (depending on how many classes are used) when compressed.
- Tidy – Optional automatic deletion of completed tweens helps keep memory managed with minimum effort.
- Last but not least, it’s Free – It’s free and open source. In other words, you already own it and are free to change it.
Tags: KitchenSync
KitchenSync is getting better with every day. Impressing architecture! Can’t wait to have my “second” look at it. Keep up the fantastic work!
Excellent post & overview, i plan on using much of this on an upcoming project. Nice work.
thx for this post! i’ve wondered how kitchensync compares to the other tweeners and this is what i hadn’t looked deep enough to learn. the best thing is it provides solutions to conundrums i’m already tackling that i wouldn’t have anticipated from a tweener in a way i wouldn’t have considered. great work and i’ve appreciated caleb’s recent pv3d series too!
Erik, Matthew, Jon,
Thanks very much! I’m glad you guys are into it.
I call for the banning of all tweening in flash and actionscript.
Flash Basterd,
I don’t know who you are but i thought it was interesting that the last time you posted a comment was 9/12/2007.
Anyway, i second your remark.
Hey, I checked you script at the weekend.. very impressive.. excellent job!
I came across two thing I could not solve:
1. How can I add a event-listener for the tweening is finished, something like:
myTween.addEventListener(KitchenSyncEvent.ACTION_COMPLETE, doSomethingFunction);
2. Is it possible to tween functions instead of properties, e.g. for tweening the font size:
var tween:KSTween = new KSTween(theFormat, “size”, this.startSize, this.endSize, “2sec”, “0sec”, Cubic.easeInOut);
tween.start();
theTextField.setTextFormat(theFormat);
Thanks for any hint!
Ralf