1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
#include "NetServices.as"
#include "NetDebug.as"
function Result()
{
//receives data returned from the method
this.onResult = function(result)
{
trace("Data received from server : " + result);
}
this.onStatus = function(error)
{
trace("Error : " + error.description);
}
}
NetServices.setDefaultGatewayUrl("http://localhost:8500/flashservices/gateway");
var connexion = NetServices.createGatewayConnection();
var server = connexion.getService("com.macromedia.test.HelloWorld", new Result());
server.sayHello(); |