Flash mm.cfg配置

在Flash开发中可以通过配置mm.cfg文件,来对Debugger版本的Flash Player进行一些配置。例如设置trace() 日志输出到本地文件中,设置策略文件请求记录到本地文件中等。

Flash Player 10.1或更高版本中,根据不同的操作系统,mm.cfg文件存放路径如下(如果相应的路径下没有该文件,创建一个即可):

一、mm.cfg文件路径

操作系统

路径

Macintosh OS X

Flash Player first checks the user’s home directory (~). If none is found, then Flash Player looks in /Library/Application Support/Macromedia

Windows 2000/XP

%HOMEDRIVE%\%HOMEPATH%

The default value is “c:\Documents and settings\username”.

Your system administrator might map the home directory to a shared network drive. In that case, check with your system administrator to determine how to configure your debugger Player.

Windows Vista/7/8

%HOMEDRIVE%\%HOMEPATH%

The default value is “c:\Users\username”.

Your system administrator might map the home directory to a shared network drive. In that case, check with your system administrator to determine how to configure your debugger Player.

Linux

/home/username

 

二、mm.cfg文件中相关属性的设置:

Property

Description

ErrorReportingEnable

是否记录错误信息。

取值0或1。

当取值为1时打开此功能。

默认取值是0。

MaxWarnings

Sets the number of warnings to log before stopping.

The default value of theMaxWarningsproperty is 100. After 100 messages, the debugger version of Flash Player writes a message to the file stating that further error messages will be suppressed.

Set theMaxWarningsproperty to override the default message limit. For example, you can set it to 500 to capture 500 error messages.

Set theMaxWarningsproperty to 0 to remove the limit so that all error messages are recorded.

PolicyFileLog

是否记录策略文件请求消息。

取值0或1。

当取值为1时打开此功能。

默认取值是0。

PolicyFileLogAppend

Lets you save the contents of the policy file log file.

Set thePolicyFileLogAppendproperty to 1 to save previous policy file log entries. The default value is 0.

IfPolicyFileLogAppendis not enabled, each new root-level SWF clears the log file. If PolicyFileLogAppend is enabled, the previous contents of the log file will always be kept, and the log file will grow at the end.

If many different root-level SWF files are loaded during your testing, you will probably want to enablePolicyFileLogAppend. However, if you enablePolicyFileLogAppend, you will probably need to manually rename or delete the log file from time to time, since otherwise it will grow to a large size, and it will be difficult to determine where previous output ends and new output begins.

TraceOutputFileEnable

是否打开trace日志的记录功能

取值0或1。

当取值为1时打开此功能。

默认取值是0。

TraceOutputFileName

trace日志输出文件名

NoteBeginning with the Flash Player 9 Update, Flash Player ignores theTraceOutputFileNameproperty and stores the flashlog.txt file in a hard-coded location based on operating system.

Sets the location of the log file. By default, the debugger version of Flash Player writes error messages to a file named flashlog.txt, located in the same directory in which the mm.cfg file is located.

SetTraceOutputFileNameto override the default name and location of the log file by specifying a new location and name in the following form: On Macintosh OS X, you should use colons to separate directories in the TraceOutputFileName path rather than slashes.

TraceOutputFileName=<fully qualified path/filename> 

 

 三、trace日志文件路径

Flash Player 9 更新之后,trace日志文件路径貌似已经不能修改了,其默认地址如下:

Operating System

Log file location

Windows 95/98/ME/2000/XP

C:\Documents and Settings\username\Application Data\Macromedia\Flash Player\Logs

Windows Vista/7/8

C:\Users\username\AppData\Roaming\Macromedia\Flash Player\Logs 

Macintosh OS X

/Users/username/Library/Preferences/Macromedia/Flash Player/Logs/

Linux

/home/username/.macromedia/Flash_Player/Logs/

 

四、一个配置样例

ErrorReportingEnable=1 
PolicyFileLog=1 
TraceOutputFileEnable=1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值