Actually this frame-rate is not faked. It is not the actual screen refresh rate. This means you do not have 65.000 new screens during one second, but, and that is the funny thing: you have 65.000 executions of a function in one second. This is an evil hack and slows down the whole display stuff of Flash. So you can not use this in any of your projects but it is funny to watch. I think you can get higher, I was just lazy and got tired searching for the best settings.
So there is no use for this. Just fun to watch :)
By the way the initial idea came from André Michelle. The competition is open, ha! How high can you get?
Ralf Bokelberk had a nice idea about how to get dynamically to the function name of the calling function. This may sound a little bit wired, but if you do debugging it is nice to do something like Logger.add( 'log this infomration', ... ); and then have the output with the calling function (and maybe line number).
For instance something like com.test.package::Class/function(): log this information.
Now the solution Ralf had is throwing an error and get to the whole stuff by using the stack trace. This works pretty well. In debug mode you can also send line-numbers and file information to your log output which is very nice.
[as]var stackTrace: String;
try { throw new Error(); }
catch ( e: Error ) { stackTrace = e.getStackTrace(); }
var lines: Array = stackTrace.split( “\n” );
var isDebug: Boolean = ( lines[ int( 1 ) ] as String ).indexOf( ‘[' ) != int( -1 );
var path: String;
var line: int = -1;
if ( isDebug )
{
var regex: RegExp = /at\x20(.+?)\[(.+?)\]/i;
var matches: Array = regex.exec( lines[ int( 2 ) ] );
path = matches[ int( 1 ) ];
//file:line = matches[2]
line = matches[ int( 2 ) ].split( ‘:’ )[ int( 2 ) ];//windows == 2 because of drive:\
}
else
{
path = ( lines[ int( 2 ) ] as String ).substring( 4 );
}
msg = path + ( line != -1 ? ‘[' + line.toString() + ']‘ : ” ) + ‘: ‘ + msg;[/as]