Killing zombie sequences dead in KitchenSyncLib
I've only recently discovered KitchenSyncLib, an excellent open source ActionScript 3 library for sequencing all manner of things in Flash and Flex applications (animations, function calls, etc.)
It's an absolute joy to work with but I did hit one tiny snag: When you create a Sequence
instance (or any subclass of AbstractSynchronizedActionGroup
), populate it with some Actions, and then kill()
it, the child actions do not get killed off and can cause the whole Sequence instance to return as a zombie to eat your brains as you tear your hair out in frustration (see issue 10).
The fix, thankfully, is easy. Just replace the kill()
method in AbstractSynchronizedActionGroup
with the one below:
override public function kill():void
{
for (var i in _childActions)
{
_childActions[i].kill();
}
_childActions = null;
super.kill();
}
Once you've killed all the children and performed your super.kill() power move, the zombie sequences will leave your brains alone forever. :)
Comments
by Justin Winter on 2008-04-18 22:51:31
by Mims H. Wright on 2008-04-19 17:42:31