tags:

views:

9

answers:

1

I am connected to the Flash Media Server Administration API via RTMPE on port 1111 and I'd like to monitor calls to trace() from the server side actionscript code.

A: 

Here's how it's done:

var netConnection : NetConnection = new NetConnection();
netConnection.connect( "rtmpe://fmsuri:1111", adminUsername, adminPassword );

var netStream : NetStream = new NetStream( netConnection );
netStream.client = { onLog: handleLog };
netStream.play( "logs/application/appName/instanceName", -1 );

function handleLog ( info : Object ) : void {
     trace( info[ "description" ] );
}
Simon Cave