1 Reply Latest reply on Oct 28, 2006 1:55 AM by SmackHack

    NetConnect Result ?? where is it

      Hi All,

      I'm trying to get the "clientObj" passed to the client.
      Im connecting to FMS2. On the app.onConn. Im returning the clientObj, but do not know where to get hold of it on the client.
      I have tried adding an ResultEvent to the NetConnection without much luck. (for this code se below)

      private function connect():void {
      nc = new NetConnection();
      nc.objectEncoding =0;
      nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
      nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
      nc.addEventListener(ResultEvent.RESULT, getclientObj);
      private function getclientObj(event:ResultEvent):void{
      Obj = event.result
      trace("some result has come back for FCS on the nc")


      The .asc looks like this.

      application.onConnect = function(clientObj,rClientName) {
      trace("a client is trying to connect");
      if (rClientName != ""){
      isUser = new Boolean(false);
      for (i in users){
      if( rClientName == users .userName){
      //isUser = true;
      clientObj.streamName = "stream_" + rClientName ;
      clientObj.broadcasterName = rClientName;

      clientObj.mystatus = "Online";
      clientObj.inSession = new Boolean();
      clientObj.inSession = false
      onlineUsers_so.setProperty(clientObj.broadcasterName, clientObj);

      return clientObj;

      //clientObj = connRecjUser(clientObj,isUser,rClientName);

      It is probably something REALY Stupid but Im stuck.
      pls. help !!!