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

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

问题描述

我有一个用 java 编写的应用程序,我想给它添加一个 flash 前端.Flash 前端将与独立 Flash 播放器中的 Java 应用程序在同一台计算机上运行.我需要两部分之间的双向通信,并且不知道如何开始解决这个问题.我想我可以在两个程序之间打开一个套接字,但我觉得必须有一个更简单的方法.actionscript 3.0 中的 api 是否有一个很好的部分可以让我直接访问 java 方法,还是我必须求助于套接字?顺便说一下,我对 Flash 比较陌生,因此非常感谢任何好的指南!

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!

谢谢

推荐答案

AMF 是一个通常用于闪存和后端系统之间通信的消息传递协议.有几种 Java 实现,但我没有使用过其中的任何一种,因此无法告诉您哪个是最好的.

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 还可以将普通的旧 XML、SOAP 或 REST 与后端通信,因此根据您的代码库,这可能会更容易.

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天全站免登陆