It might be simplistic (I'm a noob) but this is what I do:

            private function faultHandler(fault:FaultEvent):void
            {
                switch(fault.fault.faultCode.toString())
                {
                        case "Client.Error.RequestTimeout":
                                Alert.show("The server is not responding. Please
check that you are connected and the server is running.", "Server
Timeout");
                break;
                        default:
                                Alert.show(fault.fault.faultString,
fault.fault.faultCode.toString());
                        break;
                }
            }



--- In [email protected], "Don Kerr" <[EMAIL PROTECTED]> wrote:
>
> Can anyone point me to examples of how to alert the user if/when
> connection to server is lost in a Flex app? So that they don't watch
> the spinning clock and wait for the fault...then send in hundreds of
> support requests:)?
> 
> If the server is down or ColdFusion Flex Gateway is hung, I want to
> alert the user in a friendly way.
> 
> I have the same issue with my AIR apps. Additionally with AIR, in
> cases where the user is outside the NASA firewall and can't connect to
> flex gateway.
> 
> Maybe there is some Actionscript I could use in both my Flex and Air
apps?
> 
> Or do I simply have to shorten the timeout period on the RemoteObject
> and use a event:faultEvent to popup up a custom alert?
> 
> Any suggestions?
> 
> Thanks,
> Don
>


Reply via email to