守望者--AIR技术交流

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
热搜: ANE FlasCC 炼金术
查看: 1223|回复: 0

[技术资料] Flash开发中的mm.cfg文件

[复制链接]
  • TA的每日心情
    擦汗
    2018-4-10 15:18
  • 签到天数: 447 天

    [LV.9]以坛为家II

    1742

    主题

    2094

    帖子

    13万

    积分

    超级版主

    Rank: 18Rank: 18Rank: 18Rank: 18Rank: 18

    威望
    562
    贡献
    29
    金币
    51691
    钢镚
    1422

    开源英雄守望者

    发表于 2015-6-3 15:47:08 | 显示全部楼层 |阅读模式
    本帖最后由 破晓 于 2015-6-3 15:48 编辑

    在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日志输出文件名
    Note: Beginning 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


    参考资料:http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7fc9.html



    本文来自:http://www.cnblogs.com/talywy/archive/2013/06/05/3118749.html


    守望者AIR技术交流社区(www.airmyth.com)
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    
    关闭

    站长推荐上一条 /4 下一条

    QQ|手机版|Archiver|网站地图|小黑屋|守望者 ( 京ICP备14061876号

    GMT+8, 2019-8-20 21:57 , Processed in 0.040503 second(s), 35 queries .

    守望者AIR

    守望者AIR技术交流社区

    本站成立于 2014年12月31日

    快速回复 返回顶部 返回列表