7th October 2008

Crear rooms en red5 y flex

posted in Programacion |

Codigo de ejemplo:

public boolean appConnect(IConnection conn, Object[] params){

//Se enviaran 2 parametros, el parametro 0 indica si es modelo o usuario, el parametro 1 el nombre del room, el parametro 2 el modo privado

   if (params[2].toString()==”privado”){ 

if (!this.appScope.hasChildScope(params[1].toString()) && params[0].toString() ==”modelo”)

           this.appScope.createChildScope(params[1].toString());

       IScope room = this.appScope.getScope(params[1].toString());

       if (this.appScope != room)//guard against re-entrancy

       {

//appScope=room;

           conn.connect(room);//this will reconnect to the room scope

           return appConnect(conn, params);

       }

   }

 

return true;

}

This entry was posted on Tuesday, October 7th, 2008 at 13:02 and is filed under Programacion. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply