Groups | Blog | Home
all groups > macromedia flash flash remoting > april 2004 >

macromedia flash flash remoting : Network connection loss detection


magnet_web
4/10/2004 3:48:34 PM
Hello,

We use FlashRemoting to call a CFC. We also use the onStatus function to
handle all errors that may arise because of the CFC. We now need to add a
further level of check to the calls.

What if the network connection broke up? How can we detect a network
connection failure in Flash and take appropriate action?

Has anybody done something similar?

TIA.

:Nirav
Pete
4/12/2004 4:42:54 PM
You could try examining other properties of the error object that is
returned in the onStatus message.

Have you looked at the information that comes back in the NetConnection
Debugger for such an error?


[quoted text, click to view]

magnet_web
4/20/2004 2:54:19 PM
Hi,

Unfortunately, there is no onStatus being returned! We have an onStatus function, but on network disconnection that does not get called!

Any ideas will be appreciated.

Pete Thomas
1/19/2005 3:24:14 PM
Catching server timeout errors when using Flash Remoting When calling remote
services / methods via Flash Remoting, any errors that occur will trigger the
onStatus method to be called: onStatus = function(error){ trace('Error : '
+ error.description);} However, if Flash cannot connect to the server (network
or server is down) onStatus will not be called. Using XML and LoadVars you have
to manually keep a timer in order to time out the connection, however you do
not have to do this using Flash Remoting. Just create a method like the
following: _global.System.onStatus = function(info){ trace('details : ' +
info.details); trace('description : ' + info.description); trace('code : ' +
info.code); trace('level : ' + info.level);} This method will be called if
Flash MX cannot connect to the Flash Remoting server. Here is an example
output (when the server is not running): details:
http://localhost:8500/flashservices/gateway/description: HTTP: Failedcode:
NetConnection.Call.Failedlevel: error Couple of notes : The exact messages may
depend on the browser. This will only works when connecting to the server via
Flash Remoting. It will not work when using the XML or LoadVars object.
AddThis Social Bookmark Button