Showing 1 - 1 of 1 total. RSS Feed WordPress RSS Feed

Dispatch events between native windows

I was looking to a way to dispatch events between ultiple windows in an AIR application and, after I found on google only some solution that state to send a reference of the target for the event to the new window uing public properties, I came out with a more elegant solution that involves a new class added to nabiro.
The idea is that this class acts like a bridge on which is possible to register a DisplayObjetc for a specific message (i.e. the event type), the snippet represent only the simple usage of thebridge for register a new DisplayObject, attached there is the complete sample.
bridge = WindowsBridge.getInstance();
bridge.register(this, "Test");

addEventListener("Test", onTest);

// Window dispatch code
var test:WindowsBridge = WindowsBridge.getInstance();

test.dispatchEvent(new IntraWinComEvent(IntraWinComEvent.DEFAULT, new Event("Test")));
Showing 1 - 1 of 1 total. RSS Feed WordPress RSS Feed