Page 1 of 1
HELP can't get room id from json extensionresponse
Posted: 31 Oct 2010, 20:28
by IKA
Hi,
I really can't find in the doc, how to read the room id (that i can see in the json trace) from a json command.
{"t":"xt","b":{"r":57752,"o":{"lv":"1",".............
How can i get the r param?
i have tryed by using resObj.r but it didn't work.
Posted: 31 Oct 2010, 21:26
by BigFIsh
You'll need to get .data first, i.e. resObj.data.r
Posted: 31 Oct 2010, 21:42
by IKA
not working.
Are you sure about the command? Keep getting undefined also with resObj.data.r
nc.onExtensionResponse = function(resObj:Object, type:String)
{
trace(resObj.data.r);
}
keep getting undefined. Rest of the onExtensionResponse works correctly. I can read successfully the resObj._cmd and other values.
Pls help.
Posted: 31 Oct 2010, 22:26
by BigFIsh
My bad, I didn't read your posting properly.
For JSON, you can't access the roomId directly (a known issue). So in order to get a room id, you'll need to manually pass it along with your data.
Another mistake:
It's resObj.dataObj - and this is for AS3. For AS2, you can access it directly.
Posted: 01 Nov 2010, 08:40
by IKA
How could this be?
the room id data is in the JSON command. How come SFS cannot intercept it?
Posted: 01 Nov 2010, 17:57
by BigFIsh