⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.asc

📁 基于FLEX和FMS3的视频会议原代码,可实时观看别人的摄像头
💻 ASC
字号:
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+"加入聊天室");
			userList.push(value);
			trace("当前用户列表"+userList);
			application.broadcastMsg("playOtherVideo",userList);
		}
	}
}

application.onDisconnect=function(currentClient)
{
	trace("用户"+currentClient.username+"离开聊天室");
	
	for(j=0;j<userList.length;j++)
	{
		if ( userList[j]==currentClient.username )
		{
			userList.splice(j,1);
		}
	}
	trace("当前用户列表"+userList);
	application.broadcastMsg("playOtherVideo",userList);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -