Hello,
We have an application that has a timeout of 5 min. If on a screen with Flash
movie connected with Remoting when the timeout occurs, there doesn't seem to be
a way for flash to detect this.
We could build a JS timer in the page that would pop a warning, but I'd rather
not go that way.
There is a remoting message that is generated (viewable through
netConnectionDebugger) when the user clicks on the flash app. Does this error
send something to flash or is it just a message for the debugger?
Thanks,
Hunt?r
Pete Thomas - 19 Jan 2005 15:23 GMT
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.