main.asc

来自「FMS_.NET _FlashRemoting,」· ASC 代码 · 共 27 行

ASC
27
字号
load ("netservices.asc");
//
application.onConnect = function (client, _name)
{
	trace (_name);
	if (_name != "yaoyao")
	{
		this.rejectConnection (client,
		{
			msg : "服务器只认识yaoyao,其它人等拒绝连接,嘿嘿~"
		});
	} else
	{
		this.acceptConnection (client);
		//
		NetServices.setDefaultGatewayUrl ("http://localhost/RemotingApp/gateway.aspx");
		var conn = NetServices.createGatewayConnection ();
		var myService = conn.getService ("RemotingApp", this);
		myService.TestDemo();
		application.TestDemo_Result = function (result_obj)
		{
			trace(result_obj);
			client.call ("ret_result", null, result_obj);
		}
	}
};

⌨️ 快捷键说明

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