Sending response from Java extension to AS client
Posted: 14 May 2007, 04:32
I have the following code on AS client.
and the following code on java extension side
But I dont get any response on the client side.
Any suggestions...
Code: Select all
smartFox.onExtensionResponse = function(resObj:Object, type:String)
{
_global.key = resObj.serversimulationid
trace("ServerSimulationId from Smartfox Server = " + _global.key)
}
Code: Select all
public void handleRequest(String cmd, ActionscriptObject ao, User u, int fromRoom)
{
if (cmd != null && cmd.equals("GETSERVERSIMULATIONID"))
{
String sServerSimulationId = Util.getGUID();
System.out.println(" sending new server simulation id to client=" + sServerSimulationId);
// All users except "who"
LinkedList ll = new LinkedList();
ll.add(u.getChannel());
ActionscriptObject resObj = new ActionscriptObject();
resObj.put("serversimulationid", sServerSimulationId);
sendResponse(resObj, fromRoom, u, ll);
return;
}
}\Any suggestions...