如何制作可以从浏览器插件或其他 Windows 应用程序接收数据的 Flash 浏览器应用程序?
换句话说,假设我想以编程方式将数据(例如文本)从 Windows 应用程序(例如浏览器插件)发送到浏览器中运行的 Flash 应用程序。嗯,从概念上讲,一个例子可能是带有文本框和“发送”按钮的 Flash 即时通讯程序;假设我希望能够以编程方式粘贴文本并按“发送”或以其他方式激活它。这不是我在现实中试图做的事情(即,不,我不是想向其他人的聊天室或任何其他人发送垃圾邮件),而只是对类似情况的说明。
我是编写 Flash 应用程序的人,因此我可以在其中包含任何可能需要的小部件或 hack。我出现这个问题的原因是,据我所知,为我提供所需数据的 SDK 无法直接从 Flash 访问,因此我需要一种方法将数据从常规应用程序传输到 Flash。
编辑:
tehmou,谢谢您的回答。
另外,我想知道,我可以让 Flash 应用程序通过本地主机 IP 与其他应用程序交互吗?或者浏览器中的哪些服务器 Flash 可以交互、哪些不能交互有严格的限制?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 javascript 可能是一个解决方案。您可以使用ExternalInterface类将JS函数映射到actionscript函数,然后从插件中调用它。 (使用ExternalInterface的静态addCallback和call方法与JS交互。)我不知道我们在谈论什么样的插件,但是只要你可以访问包含HTML的JS,这应该没问题。
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.