tags:

views:

17

answers:

1

I have two Local applications that i want to integrate into one application. One is a flex 4 application that is compiled as an AIR application so it has a .SWF file extension and a Windows WPF application. The two applications have to constantly pass values between each other constantly. If possible, I would love to avoid a asp.net service bridge as these are local applications. Now, before you say to use Google to search for an answer, I have and found a few examples to do so but none of them worked.

I found this forum post: http://social.msdn.microsoft.com/forums/en-US/wpf/thread/39d558c1-5a76-4aae-be57-6aec9b8bf319

That gave me a starting point but when i launch the application, the flash application does not load.

I am aware of the flex 4 requirement of externalinterface to call c# functions but the flex app doesn't get that far... it just hangs on load immediately. At the same time, if i run the application in the flash movie player, it works fine except the .net application is not aware of the flex application, therefore i have no idea how to pass values between them. Any Suggestions?

A: 

A few options that I would consider:

  1. Build both apps using the same code base. My intuition tells me this is the best solution, however there is most likely a big time cost to doing this.
  2. Use a bridge between the two apps. This will, basically, entail installing a server on each client machine. It is doable but I assume could lead to an update / maintenance nightmare.
  3. Two AIR applications can pass data between them using a LocalConnection. It may be possible for you to create a .NET implementation of this and have the AIR app and .NET app talk to each other. I doubt it'd be trivial, though.
  4. Flex supports sockets, so you can listen to a port. I suspect you can do the same in a .NET app. You may be able to write code in both apps to pass the data back and forth.
  5. Using Adobe AIR's NativeProcess functionality. I'm reaching here and am not sure exactly how nativeProcess can be used to help solve the issue.

The Flex ExternalInterface is used to call JavaScript in it's enclosing HTML Page. I'm unsure how you would use it to call C# code.

www.Flextras.com