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.
views:
9answers:
1
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
2010-09-28 16:20:56