Archive for the ‘Uncategorized’ Category

Simple Sequencer

Friday, November 7th, 2008

We often have the problem of sequencing animations and events, e.g. 1. close all windows, 2. move somewhere else, 3. open windows.

To make our lives a little bit easier I was looking for a simple class that we can use to sequence those tasks. I looked around but couldn’t find anything that was small, simple to fit our needs. So I wrote one called SimpleSequencer.

(more…)

Event Fast Forward

Thursday, September 11th, 2008

In some cases you just want to pass along an Event to it’s parent. Instead of writing a new relay function like..

myEvtDisptchr.addEventListener(Event.TYPE, _onEvent_handler);
function _onEvent_handler($evt:Event):void{
dispatchEvent($evt.clone());
}

..you can just use the inherited function dispatchEvent:

myEvtDisptchr.addEventListener(Event.TYPE, dispatchEvent);

you can also redirect an Event:

myEvtDisptchr.addEventListener(Event.TYPE, myOtherEvtDisptchr.dispatchEvent);

Simple.