log.as
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:1k
- // All Log functions
- function gStrMult( string, count )
- {
- var out = "";
- for ( i = 0; i < count; i++ )
- {
- out += string;
- }
- return out;
- }
- // Indented log.
- // Logs the message with the specified indentation level.
- function gLog(msg, indentation)
- {
- var prefix = "";
- if ( indentation != 0 )
- {
- prefix = gStrMult( " ", indentation );
- }
- trace( prefix + msg );
- }
- function gLogFrame()
- {
- gLog( "Entering Frame " + _root._currentframe + "/" + _root._totalframes );
- }
- // Error log.
- // Outputs a message of the format "X=> [$section - ERROR] $msg: Failed"
- function gErrorLog(section, msg, indentation)
- {
- gLog( "X=> [" + section + " - ERROR] " + msg + ": Failed", indentation );
- }
- // Callback function entry log.
- // Outputs a message of the format "==> [$section - CB] $msg: Callback Received"
- function gCbLog(section, msg, indentation)
- {
- gLog( "==> [" + section + " - CB] " + msg + ": Callback Received", indentation );
- }
- // Callback function exit log.
- // Outputs a message of the format "<== [$section - CB] $msg: Callback Complete"
- function gCbExitLog(section, msg, indentation)
- {
- gLog( "<== [" + section + " - CB] " + msg + ": Callback Complete", indentation );
- }