Macromedia flash media server 2-server-side actionscript language reference Benutzerhandbuch

Seite von 74
8
Server Management ActionScript Language Reference
{
if (arguments.length < 2) {
trace("ERROR! you need to supply a text object to output to");
return;
}
if (arguments.length < 3)
tabLevel = 0;
        
for (var prop in obj) {
for (var i = 0; i < tabLevel; i++) // insert requested # of tab 
characters 
destination.text += "\t";
            
destination.text += prop + " = " + obj[prop] + newline;
if (typeof (obj[prop]) == "object") { // recursively call printObj
printObj(obj[prop], destination, tabLevel+1 );
}
}
}
// Alerts you if there are errors connecting to the server.nc.onStatus = 
function(info) {
if (info.code == "NetConnection.Connect.Success") {
trace("Connected! The call should work")
} else {
// Use nc.isConnected to test condition of server
if (! nc.isConnected) 
trace("NO netConnection to server. Call will not work");
    }
}