dispatchEvent

Roger Braunstein + Mims Wright = this blog


The goal of next version of my (your) animation engine KitchenSync, is to be arguably the best and most complete library for animation and sequencing out there. To do this, I’ve spent the last couple of months analyzing the top existing tween libraries trying to pinpoint their strengths and weaknesses. With lots of help from the Draw Logic Blog, I think I’ve identified the contenders and put together a decent list of what (in my opinion) are their highest and lowest points. The next step will be to create a product backlog for KitchenSync based on matching these features and fixing the problems. I know there are other tween engines but these seemed to be the most prolific ones at the time. The tween engines analyzed were:

  • Tweener
  • TweenLite (and flavours)
  • Boostworthy Animation System
  • FuseKit
  • Go
  • and KitchenSync 1.1

Note: After some helpful feedback from readers (THANK YOU!) I added TweenLite to the list of libraries I reviewed. I should add here that these are fairly superficial observations about how things work and don’t go into incredible detail. If I steal any features, I’ll look closer ;-D

Keep the comments coming!

Tween Engine Comparisons (updated)


A reader sent me this question. Thanks in advance to Michael:

i’m dispatching an event from a sprite after it fades in completely
dispatchEvent(new Event(Main.ENTER_SCREEN_COMPLETE));

i’m trying to listen for to this event but for some reason it doesn’t get picked up when the capturing parameter is set to false.. that is for bubbling and the target phase.

This works
container.addEventListener(Main.ENTER_SCREEN_COMPLETE, screenTweenComplete, true, 0, true);

This does NOT work
container.addEventListener(Main.ENTER_SCREEN_COMPLETE, screenTweenComplete, false, 0, true);

Where container, is an ancestor to everything on the screen. Essentially its the the stage.

Any clues why this is happening?

Answer after the jump.
Continue reading Reader Question: Why isn’t event bubbling working…



Woo! KitchenSync v1.1 is out! It now supports timecode, default values, new easing functions and juping to a specific time in a tween. Go check it out!

Changes in 1.1:

  • ADDED jumpToTime() method to Tween (this may be moved to AbstractSynchronizedAction in a later release)
  • ADDED getTimestampFromFrames() and getTimestampFromMilliseconds() to TimestampUtil
  • ADDED Timecode to TimeStringParser. Now “:ss”, “mm:ss;ff”, and “dd:hh:mm:ss;ff” are supported.
  • ADDED ActionDefaults class for storing default initialization values.
  • ADDED easeOutIn() to most of the easing functions (buggy. seems to overshoot target in some cases)
  • ADDED version check in Synchronizer.initialize()
  • CHANGED type of Numbers within Timestamp to int.
  • REFACTORED all actions to contain super() in the constructor.
  • REMOVED errors that are thrown when pause() and start() are called at the wrong times.
« Previous PageNext Page »