This content has been marked as final. Show 6 replies
Yes, via LocalConnection. (See the docs for details.)
Oliver Goldman | Adobe AIR Engineering
Thanks for reply.
But seems I didn't explain exactly what I want to do. So.
I have two application. They comunicate using LocalConnection. Is it possible to add event listener at 1st app that will hahdle event that fires at 2nd app? I'm talking about custom events. For example at 1st app I need to listen Button Click event. Button is at 2nd app.
LocalConnection is the best means for communication between the 2 apps. You cannot have one app listen to the events in another app, but it can receive something from the other app via LocalConnection. The other app should send somthing via LocalConnection during it's handling of the event. When the one app receives that, it can do what it wants.
So, 1st app is ready to receive something via LocalConnection. The 2nd app has a Button listening for the click, and clickHandler function happens on the click. In the clickHanlder function, send something using LocalConnection.
I hope that helps!
Thank you for helping me
Via LocalConnection object I can call some method in other app, but when it runs(e.g. 1 minute) I have to wait for responce. Using event this method could be called as reaction and I can be free for performing some other actions in my 1st app while 2nd is busy.
In documentation for Flex by following link
I found next text:
Components have built-in events that you can handle in ActionScript blocks in your MXML applications. You can also take advantage of the Flex event system's dispatcher-listener model to define your own event listeners outside of your applications, and define which methods of your custom listeners will listen to certain events. You can register listeners with the target object so that when the target object dispatches an event, the listeners get called.
Maybe you can give me some link where I can find description how It's possible to do.
Sorry, that text is a little misleading. It means that you can define the listeners outside of the main application file (such as in a class). It has nothing to do with sharing event handlers across applications. I'll reword it for the next release. Thanks,
Thank you very much!