下面是对应的SIT部分的Java代码:
if(cmd.equals(this.cmd_SIT)) {
if(param != null) {
param = param.trim();
if( param.indexOf(" ") != -1) {
String desk_name = param.substring(0, param.indexOf(" "));
param = param.substring(param.indexOf(" "));
param = param.trim();
String chessman_status = param.substring(0,param.indexOf(" "));
String player_name = param.substring(param.indexOf(" "));
player_name = player_name.trim();
chessman_status = chessman_status.trim();
user.deskname = desk_name;
user.place = chessman_status;
if (chessman_status.equals("stand_up")) {
user.deskname = null;
user.place = null;
user.play_status = null;
}
(本文来源于图老师网站,更多请访问http://m.tulaoshi.com/fjc/)// 由于是广播,所以自己也会收到一个坐下的命令,所以自己就不发给自己了
user.manager.notifyAll(packMsg(this.m_SIT, desk_name+":" + chessman_status + ":" + player_name,"" ));
}
}
(本文来源于图老师网站,更多请访问http://m.tulaoshi.com/fjc/)}
服务器发一条信息,是如何收到,然后如何动作的呢?请看下面的部分Flash代码:
function onXML_Receive(x) {
if (x == null) {
return;
}
(本文来源于图老师网站,更多请访问http://m.tulaoshi.com/fjc/)var e = x.firstChild;
if (e == null) {<