📄 people.asc
字号:
/** * Copyright ?2002 Macromedia, Inc. All rights reserved. * * people.asc * Moving or modifying this file may affect the applications installed on this server. */try { var dummy = FCPeopleList; } catch ( e ) { // #ifndef FCPeopleList load( "components/component.asc" ); // // People List component class // FCPeopleList = function(name) { this.init(name); // Get a non persistent shared object for the list of users this.users_so = SharedObject.get( this.prefix + "users", false ); } // All named instances are held in instances FCPeopleList.prototype = new FCComponent("FCPeopleList", FCPeopleList); FCPeopleList.prototype.users_so = null; // Users SharedObject /////////////////////////////////////////////////////////////////////////// // onXXX events that are called at appropriate times // This is called when a client disconnects FCPeopleList.prototype.onDisconnect = function( client ) { // get per client global storage var clocal = this.getClientLocalStorage(client); this.users_so.setProperty(clocal.id, null); // Need to call this at the end since we are overriding // the base onDisconnect this.releaseLocalStorage(client); } /////////////////////////////////////////////////////////////////////////// // Methods that a client side component calls explicitly // The first method called by a client component FCPeopleList.prototype.connect = function( client,userLevel, userSex,cam,mic ) { var cglobal = this.getClientGlobalStorage(client); var clocal = this.getClientLocalStorage(client); clocal.id = "u" + this.getClientID(client); userName=cglobal.username == null ? " fc_lurker" : cglobal.username; //this.users_so.setProperty(clocal.id, cglobal.username == null ? " fc_lurker" : cglobal.username); this.users_so.setProperty(clocal.id, {level:userLevel, name:userName, cam:cam,mic:mic,sex:userSex,ip:client.ip}); } // The last method called by a client component FCPeopleList.prototype.close = function( client ) { } /////////////////////////////////////////////////////////////////////////// // Helper and utility methods FCPeopleList.prototype.changeName = function(client,userLevel,userSex) { var cglobal = this.getClientGlobalStorage(client); var clocal = this.getClientLocalStorage(client); userName=cglobal.username == null ? " fc_lurker" : cglobal.username; //this.users_so.setProperty(clocal.id, cglobal.username == null ? " fc_lurker" : cglobal.username); this.users_so.setProperty(clocal.id, {level:userLevel, name:userName, sex:userSex,ip:client.ip}); }; trace( "PeopleList loaded successfully." );} // #endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -