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

  • Publicidad

  • Calendar

  • October 2008
    M T W T F S S
    « Sep   Nov »
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031