flex编译相关参数

【编译参数】
-default-background-color int
-default-frame-rate int
-default-size width height
设置SWF的背景色,帧频与宽高,这个也可以通过元标签设置,诸如
[SWF(width="720",height="560",backgroundColor="#000000")]

-default-script-limits
-max-recursion-depth
-max-execution-time 
定义应用脚本程序的执行限制,最大代码条目,最大递归层次,最大的执行时间

-debug=true|false 
是否生成调试用SWF,调试用SWF会比一般的SWF要大。在Flex Builder中,默认为true,而在以Release方式时发布时,默认为false,所以用Release发布的文件会被debug时小很多。

-optimize=true|false 
优化as,减少文件大小,增加性能,默认为true。

-strict=true|false 
是否采用严谨模式

-use-network=true|false 
可读取网络或者可读取本地文件

-includes class [...]
强制导入类,不管是否曾使用过这个类

-include-libraries library [...]
强制导入SWC文件中的所有类,不管是否曾使用过这个类

-frames.frame label class_name [...] 
将类绑定label标记的帧上

【后台相关】

-context-root string
-context-path string
设置{context.root}的值,这个数值被应用在flex-services.xml,flex-config.xml内,是flash Remoting的必要参数,以确认服务端目录。也可通过设置Flex Server内的context root。

-services filename 
指定services-config.xml的位置,用于Flash Remoting。也可以通过新建项目的选项卡设置。


【调试时信息】

-benchmark=true|false 
是否输出编译时期的详细信息,默认为true

-warnings=true|false 
是否显示警告信息

-show-unused-type-selector-warnings=true|false
是否显示未使用CSS的警告信息

-show-binding-warnings=true|false 
是否显示绑定失效信息

【其他】

-keep-generated-actionscript=true|false 
保留编译MXML文件过程中的AS文件

resource-bundle-list filename | 打印所有源数据包名字,并打包到一个swc文件中,filename将是这个swc的文件名。
runtime-shared-libraries url [...] | 指定一系列运行时共享库,如果library.swf在 web_root/libraries目录下,那你可以使用 libraries/library.swf.来调用。
services filename | 指定 services-config.xml文件,该文件用在FDS中
show-binding-warnings=true|false | 当flash player不能探测时,显示警告。默认为true
show-actionscript-warnings=true|false | 发生as类错误时,发出提示。默认为true。
show-deprecation-warnings=true|false | 为flex组件显示不可用。默认为true
source-path path-element [...] | 添加源路径的路径或文件,会自动寻找mxml和as文件。可以使用通配符包含所有的文件和子路径,连接全部的文件,不能单个使用类和路径,可以使用+=。
strict=true|false | 输出为定义的属性和函数,也能执行编译时期类型的验证和提供默认参数。默认为true
theme filename [...] | 指定主题数组
title text | Swf的元数据
use-network=true|false | 指定当前应用程序的网络服务,默认为true.如果设为false就只能访问本地,不能访问网络。
verbose-stacktraces=true|false | 默认值为false,只在运行发生错误时候,提供错误显示。
version | 编译器的版本号
warn-warning_type=true|false | 是否验证自定义警告类型。
warnings=true|false | 如果设置false就废除所有的警告,此参数覆盖 warn-warning_typed 的值默认为true。


下面的列表提供了mxmlc的一些可选参数:
属性 描述
accessible=true|false 是否具有可理解性
actionscript-file-encoding 设置文件编码
advanced | mxmlc -help advanced 检索mxmlc高级参数
allow-source-path-overlap=true|false
验证source-path中定义的路径是否出现重叠,出现互相包含的现象

as3=true|false
是否使用as3对象模型,默认为ture,如果选false,则es一定要定义为true
benchmark=true|false
是否输出编译时期的详细内容,默认是true
context-root
context-path
设置flex-services.xml中的{context.root},如果没有详细定义,那flex将用空值。
contributor name

creator name
添加到swf文件里,name是作者的名字
date text

debug=true|false
是否可以进行调试
debug-password string
远程调试用,设置密码
default-background-color int
默认背景颜色
default-frame-rate int
设置帧数,默认为24
default-script-limits
定义应用脚本程序的执行限制
max-recursion-depth
最大的递归默认是:1000
max-execution-time
最大的执行时间默认是:60
default-size width height
设置应用程序的大小
defaults-css-url string
设置css的路径
description text
添加到swf文件里的描述内容
dump-config filename

es=true|false

externs symbol [...]

external-library-path path-element [...]

file-specs path-element [...]

fonts.languages.language-range lang range
指定 Unicode编码语言的范围
fonts.managers manager-class [...]
字体管理器
fonts.max-cached-fonts string
在服务器缓存上可以保存的最大字体数
fonts.max-glyphs-per-face string
最大限度的字符缓存
frames.frame label class name [...]

generate-frame-loader=true|false
绑定到默认的loader类上
headless-server=true|false
能否设置编译器的执行头文件
help
帮助
include-libraries library [...]
引用所有的在swc中的类
includes class [...]
引用具体的类
incremental=true|false
保持原有的as,放在/generated目录下,默认的值是false
keep-generated-actionscript=true|false

language code
预设字母表的编码,默认是false
lazy-init=true|false

library-path path-element [...]
打印详细的连接报告
link-report filename
指定编译器详细的配置文件,覆盖所有的命令行参数,可以通过+=连接多个配置文件。
load-config filename

load-externs filename [...]

localized-description text lang

namespaces.namespace uri manifest
指定mxml文件的命名空间,可以用 uri或本地的证明文件。(manifest.xml)
optimize=true|false
优化程序,减少文件大小,增加性能,默认为false
output filename
指定输出文件名字,如果不指定就用当前文件名。如果路径不存在,将会自动生成。
publisher name

resource-bundle-list filename

runtime-shared-libraries url [...]
指定一系列运行时共享库,如果library.swf在 web_root/libraries目录下,那你可以使用 libraries/library.swf.来调用。
services filename
指定 services-config.xml文件,该文件用在FDS中
show-binding-warnings=true|false
当flash player不能探测时,显示警告。默认为true
show-actionscript-warnings=true|false
发生as类错误时,发出提示。默认为true。

show-deprecation-warnings=true|false
为flex组件显示不可用。默认为true
source-path path-element [...]
添加源路径的路径或文件,会自动寻找mxml和as文件。可以使用通配符包含所有的文件和子路径,连接全部的文件,不能单个使用类和路径,可以使用+=。

strict=true|false
输出为定义的属性和函数,也能执行编译时期类型的验证和提供默认参数。默认为true
theme filename [...]
指定主题数组
title text

use-network=true|false
指定当前应用程序的网络服务,默认为true.如果设为false就只能访问本地,不能访问网络。
verbose-stacktraces=true|false
默认值为false,只在运行发生错误时候,提供错误显示。
version
编译器的版本号
warn-warning_type=true|false

是否验证自定义警告类型。
warnings=true|false 如果设置false就废除所有的警告,此参数覆盖 warn-warning_typed 的值默认为true。

你可能感兴趣的:(flex编译相关参数)