Can someone help with this...
I have an serverside extension calling a cmd: getZoneUsers
I want to return a list of all users in a zone to the extension response...
Code: Select all
if(cmd == "getZoneUsers"){
trace(_server.getCurrentZone().getUserList());
_server.sendResponse({cmd: "getZoneUsers", zoneUserList:_server.getCurrentZone().getUserList()}, -1, null, [user]);
}
The trace above in the admin tool looks like this:
[it.gotoandplay.smartfoxserver.data.User@1a1af15, it.gotoandplay.smartfoxserver.data.User@1edca15, it.gotoandplay.smartfoxserver.data.User@11d56b5, it.gotoandplay.smartfoxserver.data.User@6e5cfa, it.gotoandplay.smartfoxserver.data.User@19a5185]
which looks like an array of user objects?
However when I send this back to the extension response I can't access the object data. Here's me trying to loop through the data returned...
Code: Select all
var zoneUsers = resObj;
for (var i in zoneUsers){
trace(i+":"+resObj[i]);
}
How do I return this data to Flash, then access the usernames?