Skip to main content
September 29, 2009
Answered

Object sending

  • September 29, 2009
  • 2 replies
  • 482 views

Hi Every one,

I need to send the String value from .asc file to Flash AS3 in Application.rejectConnection();

Here is my code:

application.onConnect = function(newClient, name , sex)

{

var nClients = this.clients.length;

trace( "client connecting: "+newClient+"  current client count: "+nClients+"  Max Clients: "+this.maxClients );

//if adding this client to the amount of clients that are currently connected will surpass our limit, DENY else ALLOW

if( nClients + 1 > this.maxClients ){

trace("Too many users, rejecting client.");

var e = new Object();

e.curval = "full";

this.rejectConnection( newClient, e );

}

how i get the value of e.curval to flash.

Is It possible...

Kindly reply me.

Saransoft

    This topic is closed to new replies. Start a new post to keep the conversation going.
    Correct answer

    Inspect the info.application.curval property in your netStatus handler

    function handler(e:NetStatusEvent){

    if(e.info.code == "NetConnection.Connect.Rejected"){

         trace("curval is "+e.info.application.curval);

    }

    }

    2 replies

    Correct answer
    September 29, 2009

    Inspect the info.application.curval property in your netStatus handler

    function handler(e:NetStatusEvent){

    if(e.info.code == "NetConnection.Connect.Rejected"){

         trace("curval is "+e.info.application.curval);

    }

    }

    September 29, 2009

    Hi JayCharles,

    Thank for your Immediate response.

    I finished the chatting project.

    once again i thank you very much for helping..

    Saransoft