开发者

how do I make a Flash browser app that could receive data from browser plugin or other Windows app?

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 act开发者_如何学JAVAivate 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜