Flex編程注意之Flex Complier參數

來源:互聯網
上載者:User

在介紹這些參數之前,先要介紹一個工具:mxmlc.exe。
mxmlc是Flex
 SDK裡面的一個重要的工具:編譯器,也就是無論是Flash Builder
(Flex Builder
) IDE、還是plug-in形式的Flash Builder
(Flex Builder
)在編譯Flex
 Project的時候,都會自動調用mxmlc來完成我們的編譯任務。
而由於Adobe
那邊可以直接下載Flex
 SDK,因此如果是此種方式的話,則需要手動編譯你的MXML檔案了。

mxmlc
.exe的地址:
Flex
 SDK mxmlc path:
{OS}:/FLexSDK/bin/mxmlc.exe

Flash Builder
(Flex Builder
) mxmlc path:
{OS}:/...../sdks/4.0.0/bin/mxmlc.exe

具體用法:
從doc裡面進入到mxmlc
.exe所在目錄,然後輸入如下內容:
mxmlc x:/test.mxml
mxmlc x:/test.as
上述兩個內容分別是對text.mxml和test.as進行編譯。同時上述的寫法也是最簡答的一種,也就是不加入任何參數的形式。

下面的列表提供了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-rootcontext-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。

 

本文轉自:http://www.k-zone.cn/zblog/post/flex-compiler-parameter.html

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.