Search code examples
flashapache-flexchannel

Flex - Is there a way to change the "Channel Disconnected" error message?


I have a Flash app with a PHP backend. Whenever there is a PHP error, I get the "Channel Disconnected before an acknowledgement was received" error message.

I'm getting ready to push my project to beta and I would prefer if this message said something more like "There was a PHP error, please log a bug" or something instead of a message they don't understand.

Anyone know of a way for me to change this error message? BTW I'm pretty much a noob when it comes to Flash programming so please be descriptive. Using Flash Builder 4 Beta 2.


Solution

  • Just figured it out. In the declaration of my PHP service, there is a parameter called "fault", which is set the following by default:

    fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"

    This is where we can change the message to whatever we want, by changing the message that is alerted.