proxyserver.as

来自「使用Flash提供的Web Service的能力」· AS 代码 · 共 19 行

AS
19
字号
class XMLRPC.ProxyServer {
	private var url:String;

	public function ProxyServer(url:String) {
		//append to the URL so it's pointing at the xml-rpc endpoint
		this.url = url+"/RPC2";		
	}

	public function Call(fn_name:String, fn_params:Array, handler:Object) {
		//create a new proxy function object
		var fn = new XMLRPC.ProxyFunction(fn_name, fn_params, this.url);
		
		//register the handler as a listener on the function
		fn.addEventListener("On"+fn_name, handler);
		
		//execute the proxy function
		fn.Execute()
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?