server 端
现在server端写一个想被调用的函数,放在 ApplicationAdapter 中:
public class TeddyAgent extends ApplicationAdapter {
...
public void hello() {
System.out.println("hello");
}
...
}
client 端
Flash 里面,创建一个NetConnection实例,然后调用 call 方法:
nc.call("hello", null);
本文介绍了一种从Flash客户端调用服务器端方法的技术实现。具体步骤包括在服务器端定义一个可供调用的方法,并在Flash客户端通过NetConnection实例发起调用。
server 端
现在server端写一个想被调用的函数,放在 ApplicationAdapter 中:
public class TeddyAgent extends ApplicationAdapter {
...
public void hello() {
System.out.println("hello");
}
...
}
client 端
Flash 里面,创建一个NetConnection实例,然后调用 call 方法:
nc.call("hello", null);

被折叠的 条评论
为什么被折叠?