application.clients[client.id].call - not working??...
i need a wey without knowing the index value of spacific client in the application clients array
to identify this user for use:
application.clients[this client id].call
to him only.
in addobe halp its says:
"Do not use the index value of the clients array to identify users between calls, because the array is compacted when users disconnect and the slots are reused by other Client objects"
but it do not say what to use??...
i try this 4 ways none working - last 2 throw error:
application.onConnect = function(client)
{
application.userId = client.id;
application.clients[application.userId].call("serverDoDisconect");
application.clients["" + application.userId + ""].call("serverDoDisconect");
application[application.userId].call("serverDoDisconect");
application.userId.call("serverDoDisconect");
}
at the moment i use not a good solution:
application.onConnect = function(client)
{
client.name = "user";
for (i = 1; i < application.clients.length; i++)
{
if(application.clients.name == "user")
{
application.clients.call("serverDoDisconect");
}
}
}
please halp
thanks
cheinan
