?? main.asc
字號:
userList = [];
application.onAppStart = function(){
trace("fms服務器已經(jīng)啟動!");
};
application.onConnect = function(currentClient){
application.acceptConnection(currentClient);
if(userList.length>=3){
currentClient.call("showServerMsg",null,"已經(jīng)達到最大用戶數(shù)");
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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -