Luar's Flash Playground:連接Flash Remoting Gateway的Exception Handling
連接Flash Remoting Gateway的Exception Handling (15-08-2003)
在連接Remote Services時,_Status可以處理任何連接失敗(Exception Handling)等情況,但開始任何連接Remote Services工作前,必須先連接Flash Remoting Gateway,這過程有沒有Exception Handling能力?例如知道連接Gateway失敗?答案是可以的:

NetServices.setDefaultGatewayUrl("http://localhost/
flashremoting/gateway.aspx");
gatewayConnection=NetServices.createGatewayConnection();
gatewayConnection.onStatus = function(info_obj) {
    if (info_obj.code == "NetConnection.Call.Failed") {
      trace("Gateway is down.");
    }
};
本文章由發表。
意見
"; print "沒有意見。
 "; } ?>
  • custService = new Service("http://localhost/
    flashremoting/gateway.aspx", null, "HelloWorld", null, null);

    由Anonymous於02-08-2004發表

同組文章