Search Flex Samples

Working with the debugger versions of Flash Player and AIR

Adobe provides developers with special editions of the Flash Player and Adobe AIR to assist debugging efforts. You obtain a copy of the debugger version of Flash Player when you install Adobe Flash CS3 Professional or Adobe Flex Builder 2. You also obtain the debugger version of Adobe AIR, which is called ADL, when you install it.

There is a notable difference in how the debugger versions and the release versions of Flash Player and Adobe AIR indicate errors. The debugger versions shows the error type (such as a generic Error, IOError, or EOFError), error number, and a human-readable error message. The release versions shows only the error type and error number. For example, consider the following code:

try
{
tf.text = myByteArray.readBoolean();
}
catch (error:EOFError)
{
tf.text = error.toString();
}

If the readBoolean() method threw an EOFError in the debugger version of Flash Player, the following message would be displayed in the tf text field: "EOFError: Error #2030: End of file was encountered."

The same code in a release version of Flash Player or Adobe AIR would display the following text: "EOFError: Error #2030."

In order to keep resources and size to a minimum in the release versions, error message strings are not present. You can look up the error number in the documentation (the appendixes of the ActionScript 3.0 Language and Components Reference) to correlate to an error message. Alternatively, you can reproduce the error using the debugger versions of Flash Player and AIR to see the full message.

0 comments:

Related Flex Samples

Learn Flex: Flex Samples | Flex Video Tutorials Flex Examples