User Guide

229
A
APPENDIX A
Server-Side Information
Objects
The Application, NetConnection, and Stream classes provide an onStatus event handler that
uses an information object for providing information, status, or error messages. To respond to
this event handler, you must create a function to process the information object, and you
must know the format and contents of the information object returned.
You can define the following global function at the top of your main.asc file to display all the
status messages for the parameters that you pass to the function. You need to place this code
in the main.asc file only once.
function showStatusForClass(){
for (var i=0;i<arguments.length;i++){
arguments[i].prototype.onStatus = function(infoObj){
trace(infoObj.code + " (level:" + infoObj.level + ")");
}
}
showStatusForClass(NetConnection, Stream);
For more information about information objects, see the appendix of the Client-Side
Communication ActionScript Language Reference for Flash Media 2.
An information object has the following properties:
level, code, description, and
details. All information objects have level and code properties, but only some have the
description and/or details properties. The following tables list the code and level
properties as well as the meaning of each information object.