Can Flash SWF communicate with Java applet, and vice versa, in any way?

放肆的年华 提交于 2019-12-20 05:26:10

问题


I know Flash can use ExternalInterface to call Javascript functions but I don't know if it can call applet also like that. Maybe it can be done by SWF -> JS -> Applet, and back, I don't know. Since I have no idea how to do applets, I would also appreciate at least some pseudo code. Thanks.


回答1:


Applets can communicate with JS, and JS can control applets. See these examples of Java/JavaScript interaction.




回答2:


Yes. Sockets. Your Java applet can open a server socket, probably a HTTP socket, and Flash/Flex can post content to the socket. Your applet will have to be signed by a known CA to be trusted, but once that's done you can pretty much do what you want.



来源:https://stackoverflow.com/questions/8032248/can-flash-swf-communicate-with-java-applet-and-vice-versa-in-any-way

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!