让Java和Flash互相交谈 [英] Getting java and flash to talk to each other

查看:115
本文介绍了让Java和Flash互相交谈的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用java编写的应用程序,我想添加一个flash前端。闪存前端将与独立Flash播放器中的Java应用程序在同一台计算机上运行。我需要两部分之间的双向沟通​​,不知道如何开始这个。我想我可以在两个程序之间打开一个套接字,但我觉得必须有一个更简单的方法。在ActionScript 3.0中有一个很好的部分,将允许我直接访问Java方法,或者我将不得不求助于套接字?

谢谢

解决方案

AMF 是一种常用的聊天通讯协议闪光灯和后端系统之间。有几个Java实现,但我没有使用任何一个,所以不能告诉你哪个是最好的。





Flash也可以将简单的旧的XML,SOAP或REST引用到后端,取决于你的代码库可能更容易。


I have an application written in java, and I want to add a flash front end to it. The flash front end will run on the same computer as the java app in the stand alone flash player. I need two way communication between the two parts, and have no idea how to even start going about this. I suppose I could open a socket between the two programs, but I feel that there must be an easier way. Is there a nice part of the api in actionscript 3.0 that will allow me to access java methods directly, or will I have to resort to sockets? I am relatively new to flash, by the way, so any good guides would be much appreciated!

Thanks

解决方案

AMF is a messaging protocol commonly used to talk between flash and a backend system. There're several Java implementations, but I haven't used any of them so can't tell you which is best.

Flash can also talk plain old XML, SOAP or REST to the backend, so depending on your codebase that might be easier.

这篇关于让Java和Flash互相交谈的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆