NResponder
Nineveh-Responder or just NResponder is a whole new engine to work with events in ActionScript 3.0. With NResponder you can do complex things like set a minimum time to wait between two consecutives dispatches or set a specific number of replies to a listener and after remove it. And you can do these kind of thing with just one line of code, with some parameters.
Official code page:
http://code.google.com/p/nineveh-responder/
What NResponder do exactly?
One of the most interesting behaviors of NResponder is that works globally, not locally like native Event API of Flash. You can cross events between different classes or even in different SWF files. With NResponder you add so much more flexibility to your application because you can changes the parameters “on the fly” (in Run-Time). NResponder is inspired on Objective-C approach and is very oriented to performance and memory. You don’t need to create any instance if you don’t want.
For example, you can do:
// Instead this
myObject.addEventListener('anEventType', initialize, false, 0, true);
// Use this
NResponder.add('anEventType', initialize);
Features
Bellow some characteristics of NResponder:
- Work in static or instantiated mode;
- Can specify the number of arguments to dispatch;
- Can change these arguments “on the fly” (in Run-Time);
- Can remove all NResponders;
- Can specify the number of replies;
- Can ordinate the replies;
- Can associate each listener with one target;
- Can have a delay to the next dispatch;
- Can pause or resume the replies;
- Can change all this attributes “on the fly” (in Run-Time);
- Can join to native Event API of Adobe® Flash® and continue to use all this features;
- Can instantiate and control each NResponder without change the others.
A comparison about these features to other two event Engines.
| Feature | Event API (Adobe® Flash®) |
Signals (Robert Penner) |
NResponder (Diney Bomfim) |
|---|---|---|---|
|
Used without instance |
|
|
|
|
Used with instance |
|
|
|
|
Specify number of dispatch arguments |
|
|
|
|
Dynamic dispatch arguments |
|
|
|
|
Change dispatch arguments in Run-Time |
|
|
|
|
Remove all |
|
limited to instance |
|
| Specify a delay time |
|
|
|
| Set the number of replies |
|
Just 1 |
|
| Ordenate |
|
|
|
| Can associate with a target |
|
only NativeSignal |
|
| Can pause without remove |
|
|
|
| Can stop propagation |
|
|
|
| Change attributes in Run-Time |
|
|
|
| Garbage Collect | only weak references |
|
|
Nineveh Responder Data Flow
You can see below the events pipeline in NResponder. With a really simple logic and a great organization NResponder can manage all events in an application.

NResponderCore is a very advanced core that can easily work with complex structures of events, like multiple events, this means somethings like, a dispatch inside another dispatch with a new addition of NResponder and changing some properties of currents dispatches, for example.
Adobe Flash Player hasn’t support multi-thread, but if it had, the NResponderCore would be prepared for it, because the core work with separated loops for different threads of dispatchs.
Documentation and Training
The NResponder engine is full documented and you can check all the docs here:
http://db-in.com/frameworks/nineveh/doc
Below you can watch videos tutorials with the features and real world examples of the usage of NResponder.
Vimeo Full Video:
Youtube 5 chapters:
Download
You can make the download of sources here:
http://nineveh-responder.googlecode.com/files/Nineveh-Responder.zip
Or visit the official code page of the NResponder:
http://code.google.com/p/nineveh-responder/
Remember to give me a feedback if you use it.

about 1 year ago
Just wanted to give a big thanks for this event engine. Easy to read, implement, and teach to others. Thanks again
about 1 year ago
I did a class with the name of eventStore. my goal was to ‘pause events’ and ‘event handling’ … so, I can do this using nReply?
Thanks again
about 1 year ago
Hi dude,
Did u mean NResponder? Not nReply, right?
Well… I’m not sure if I understand your question.
As u can see above, NResponder was made for event handling. You can easily pause the events, as I show in the comparison table’s item: “Can pause without remove”.
To see everything that NResponder does, check the project page at google:
http://code.google.com/p/nineveh-responder/
PS: Ei cara, pelo “nReply” tive uma pista q talvez tenha utilizado o google ou algum tradutor pra traduzir sua pergunta. Se vc é brasileiro e preferir perguntar em português mesmo, sem problema, pode perguntar q eu te respondo em PT mesmo, se preferir, claro.
about 1 year ago
It’s a great engine!!! Thanx u alot)))
i was used thiz engine with pureMVC framework and my projects work more faster…
about 1 year ago
Bacana! Só falta funcionar com o RobotLegs
O Signals tem um adaptador para RobotLegs para substituir os eventos nativos para disparar os Commands.
about 1 year ago
Desculpe cara, tarde de mais. AS3 ja é morto há algum tempo. Hoje só Obj-C, OpenGL e iPhone. De qualquer forma a idéia do NResponder era ter seu proprio framework, então nunca iria funcionar com o RobotLegs. Melhor mesmo vc continuar com seu signals.
Abraço