Question
Remoting from FMS
I've been trying to create a NetService object and use that
to call and get the reply of my AMFPHP remoting gateway, but for
some reason this isn't working.
I've read all the documentation I've found (not much -- apparently most want to do remoting client side, not server side), but it's not really clear how to debug the process...
Any help is greatly appreciated.
The code on the FMS main.asc file is as follows, and I've verified that the gateway does indeed work from another application (non-flash):
I've read all the documentation I've found (not much -- apparently most want to do remoting client side, not server side), but it's not really clear how to debug the process...
Any help is greatly appreciated.
The code on the FMS main.asc file is as follows, and I've verified that the gateway does indeed work from another application (non-flash):
quote:
load("NetServices.asc");
application.onConnect = function(newClient, userKey) {
this.acceptConnection(newClient);
newClient.msgFromClient = function(msg) {
msg = '<b>'+userKey+":</b> "+msg+"<br>";
application.history += msg;
application.users_so.send("msgFromSrv", msg);
};
application.users_so.send("msgFromSrv", "rawr");
gc = NetServices.createGatewayConnection(" http://localhost/flashservices/gateway.php");
svc = gc.getService("xtt", this);
svc.deduct_point("334");
}
application.onAppStart = function() {
application.users_so = SharedObject.get("users_so", false);
};
function deduct_point_Result(key) {
application.users_so.send("msgFromSrv", "Deducted points...");
}
