main.asc
来自「基于FLEX和FMS3的视频会议原代码含main.asc」· ASC 代码 · 共 37 行
ASC
37 行
userList = [];
application.onAppStart = function(){
trace("fms服务器已经启动!");
};
application.onConnect = function(currentClient){
application.acceptConnection(currentClient);
if(userList.length>=3){
currentClient.call("showServerMsg",null,"已经达到最大用户数");
application.rejectConnection(currentClient);
}else{
currentClient.communicateServer = function(value){
currentClient.username = value;
trace(currentClient.username+" come in");
userList.push(value);
trace("userList "+userList);
application.broadcastMsg("playOtherVideo",userList);
}
}
};
Client.prototype.communicateServer123=function(value){
trace(value +" come in");
userList.push(value);
trace("userList "+userList);
application.broadcastMsg("playOtherVideo",userList);
return;
} ;
application.onDisconnect = function(currentClient){
trace(currentClient.username +" come out");
for(j=0;j<userList.length;j++){
if(userList[j]==currentClient.username){
userList.splice(j,1);
}
}
trace("userList : "+userList);
application.broadcastMsg("playOtherVideo",userList);
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?