特質
minimumPatchLevel — 此應用程式所需的 AIR 執行階段最低修補程式層級。
xmlns — XML 命令空間特質會決定應用程式所需的 AIR 執行階段版本。
這個命名空間會隨著 AIR 的每一個主要發行版本變更 (但是發行次要修補程式時則不會)。命名空間的最後一個區段 (例如「3.0」) 表示應用程式所需的執行階段版本。
主要 AIR 版本的 xmlns值為:
xmlns="http://ns.adobe.com/air/application/1.0"
xmlns="http://ns.adobe.com/air/application/1.1"
xmlns="http://ns.adobe.com/air/application/1.5"
xmlns="http://ns.adobe.com/air/application/1.5.2"
xmlns="http://ns.adobe.com/air/application/1.5.3"
xmlns="http://ns.adobe.com/air/application/2.0"
xmlns="http://ns.adobe.com/air/application/2.5"
xmlns="http://ns.adobe.com/air/application/2.6"
xmlns="http://ns.adobe.com/air/application/2.7"
xmlns="http://ns.adobe.com/air/application/3.0"
xmlns="http://ns.adobe.com/air/application/3.1"
xmlns="http://ns.adobe.com/air/application/3.2"
xmlns="http://ns.adobe.com/air/application/3,3"
xmlns="http://ns.adobe.com/air/application/3.4"
xmlns="http://ns.adobe.com/air/application/3.5"
xmlns="http://ns.adobe.com/air/application/3.6"
xmlns="http://ns.adobe.com/air/application/3.7"
對於 SWF 類型的應用程式,指定在應用程式描述器中的 AIR 執行階段版本會決定可載入為應用程式初始內容的 SWF 最高版本。指定 AIR 1.0 或 AIR 1.1 的應用程式只能使用 SWF9 (Flash Player 9) 檔當作初始內容,即使使用 AIR 2 執行階段執行,也是如此。指定 AIR 1.5 (或更新版本) 的應用程式可以使用 SWF9 或 SWF10 (Flash Player 10) 檔案當作初始內容。
SWF 版本會決定可使用的 AIR 和 Flash Player API 版本。如果 SWF9 檔用來當做 AIR 1.5 應用程式的初始內容,則該應用程式只能存取 AIR 1.1 和 Flash Player 9 API。另外,在現有 AIR 2.0 或 Flash Player 10.1 中 的 API 行為變更將不會生效 (對 API 所做的與安全性相關的重要變更則不受此原則的限制,而且可追溯套用到執行階段目前或未來的修補程式)。
對於 HTML 類型的應用程式,應用程式描述器中指定的執行階段版本會決定應用程式可用的 AIR 和 Flash Player API 的版本。HTML、CSS 和 JavaScript 的行為永遠會由所安裝 AIR 執行階段中使用的 Webkit 版本來決定,而不會由應用程式描述器決定。
當 AIR 應用程式載入 SWF 內容時,可供內容使用的 AIR 和 Flash Player API 版本會根據內容的載入方法而定。有效版本有時候是由應用程式描述器命名空間決定,有時候是由正在載入之內容的版本決定,有時候則是由已經載入之內容的版本決定。下表顯示如何根據載入方法決定 API 版本:
載入內容的方法
|
決定 API 版本的方法
|
初始內容,SWF 類型應用程式
|
「已載入」檔案的 SWF 版本
|
初始內容,HTML 類型應用程式
|
應用程式描述器命名空間
|
由 SWF 內容載入的 SWF
|
「正在載入」之內容的版本
|
由 HTML 內容使用 <script> 標籤所載入的 SWF 元件庫
|
應用程式描述器命名空間
|
由 HTML 內容使用 AIR 或 Flash Player API (例如 flash.display.Loader) 所載入的 SWF
|
應用程式描述器命名空間
|
由 HTML 內容使用 <object> 或 <embed> 標籤 (或對應的 JavaScript API) 所載入的 SWF
|
「已載入」檔案的 SWF 版本
|
當載入的 SWF 檔案版本與載入內容的版本不同時,可能會遇到兩個問題:
範例
<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/3.0">
<id>HelloWorld</id>
<version>2.0</version>
<filename>Hello World</filename>
<name>Example Co. AIR Hello World</name>
<description>
<text xml:lang="en">This is an example.</text>
<text xml:lang="fr">C'est un exemple.</text>
<text xml:lang="es">Esto es un ejemplo.</text>
</description>
<copyright>Copyright (c) 2010 Example Co.</copyright>
<initialWindow>
<title>Hello World</title>
<content>
HelloWorld.swf
</content>
<systemChrome>none</systemChrome>
<transparent>true</transparent>
<visible>true</visible>
<minSize>320 240</minSize>
</initialWindow>
<installFolder>Example Co/Hello World</installFolder>
<programMenuFolder>Example Co</programMenuFolder>
<icon>
<image16x16>icons/smallIcon.png</image16x16>
<image32x32>icons/mediumIcon.png</image32x32>
<image48x48>icons/bigIcon.png</image48x48>
<image128x128>icons/biggestIcon.png</image128x128>
</icon>
<customUpdateUI>true</customUpdateUI>
<allowBrowserInvocation>false</allowBrowserInvocation>
<fileTypes>
<fileType>
<name>adobe.VideoFile</name>
<extension>avf</extension>
<description>Adobe Video File</description>
<contentType>application/vnd.adobe.video-file</contentType>
<icon>
<image16x16>icons/avfIcon_16.png</image16x16>
<image32x32>icons/avfIcon_32.png</image32x32>
<image48x48>icons/avfIcon_48.png</image48x48>
<image128x128>icons/avfIcon_128.png</image128x128>
</icon>
</fileType>
</fileTypes>
</application>