Skip to main content
Sep 29, 2009 3:06 PM UTC
Answered

Object sending

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
    Sep 29, 2009 3:13 PM UTC

    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
    Sep 29, 2009 3:13 PM UTC

    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);

    }

    }

    Translate
    Sep 29, 2009 3:43 PM UTC

    Hi JayCharles,

    Thank for your Immediate response.

    I finished the chatting project.

    once again i thank you very much for helping..

    Saransoft

    Translate