views:

51

answers:

1

in other words, suppose I want to send data, like text, programmatically from a Windows app (such as a browser plugin) to a Flash app running in the browser. Well, conceptually, an example of this might be a Flash instant messenger with a textbox and button "Send"; so let's say I want to be able to programmatically paste the text and press Send or otherwise activate it. That's NOT what I am trying to do here in reality (i.e., no, I am not trying to spam other people's chat rooms or anything) but just an illustration of a similar situation.

I am the guy writing the Flash app, so I can include in it whatever widget or hack that may be necessary. The reason why this problem is arising for me is that AFAIK the SDK that is providing me the data I want cannot be directly accessed from Flash, so I need a way to pipe the data from a regular app into Flash.

EDITED:

tehmou, thanks for the answer.

Also, I was wondering, can I have the Flash app interact with other apps through localhost IP? Or are there draconian restrictions on which server Flash in browser can and cannot interact?

+1  A: 

Using javascript might be a solution. You can use ExternalInterface class to map a JS function into an actionscript function and then call that from the plugin. (Use the static addCallback and call methods of ExternalInterface to interact with JS.) I don't know what kind of a plugin we are talking about there, but this should be ok as long as you can access the JS of the containing HTML.

tehmou