適用於 Adobe® Flash® Platform 的 ActionScript® 3.0 參考
首頁  |  隱藏套件和類別清單 |  套件  |  類別  |  新增內容  |  索引  |  附錄  |  為什麼顯示英文?
篩選: AIR 30.0 和更早版本, Flash Player 30.0 和更早版本, Flash Lite 4
Flex 4.6 和更早版本, Flash Pro CS6 和更早版本
隱藏篩選
air.update 

ApplicationUpdaterUI  - AS3

套件x

最上層
adobe.utils
air.desktop
air.net
air.update
air.update.events
coldfusion.air
coldfusion.air.errors
coldfusion.air.events
coldfusion.service
coldfusion.service.events
coldfusion.service.mxml
com.adobe.acm.solutions.authoring.domain.extensions
com.adobe.acm.solutions.ccr.domain.extensions
com.adobe.consulting.pst.vo
com.adobe.dct.component
com.adobe.dct.component.datadictionary
com.adobe.dct.component.datadictionaryElement
com.adobe.dct.component.dataElementsPanel
com.adobe.dct.component.toolbars
com.adobe.dct.event
com.adobe.dct.exp
com.adobe.dct.model
com.adobe.dct.service
com.adobe.dct.service.provider
com.adobe.dct.transfer
com.adobe.dct.util
com.adobe.dct.view
com.adobe.ep.taskmanagement.domain
com.adobe.ep.taskmanagement.event
com.adobe.ep.taskmanagement.filter
com.adobe.ep.taskmanagement.services
com.adobe.ep.taskmanagement.util
com.adobe.ep.ux.attachmentlist.component
com.adobe.ep.ux.attachmentlist.domain
com.adobe.ep.ux.attachmentlist.domain.events
com.adobe.ep.ux.attachmentlist.domain.renderers
com.adobe.ep.ux.attachmentlist.skin
com.adobe.ep.ux.attachmentlist.skin.renderers
com.adobe.ep.ux.content.event
com.adobe.ep.ux.content.factory
com.adobe.ep.ux.content.handlers
com.adobe.ep.ux.content.managers
com.adobe.ep.ux.content.model.asset
com.adobe.ep.ux.content.model.preview
com.adobe.ep.ux.content.model.relation
com.adobe.ep.ux.content.model.search
com.adobe.ep.ux.content.model.toolbar
com.adobe.ep.ux.content.search
com.adobe.ep.ux.content.services
com.adobe.ep.ux.content.services.load
com.adobe.ep.ux.content.services.permissions
com.adobe.ep.ux.content.services.preview
com.adobe.ep.ux.content.services.providers
com.adobe.ep.ux.content.services.query
com.adobe.ep.ux.content.services.relationships
com.adobe.ep.ux.content.services.search.lccontent
com.adobe.ep.ux.content.services.version
com.adobe.ep.ux.content.view
com.adobe.ep.ux.content.view.components.activate
com.adobe.ep.ux.content.view.components.grid
com.adobe.ep.ux.content.view.components.grid.hover
com.adobe.ep.ux.content.view.components.grid.hover.component
com.adobe.ep.ux.content.view.components.grid.renderers
com.adobe.ep.ux.content.view.components.relationships
com.adobe.ep.ux.content.view.components.review
com.adobe.ep.ux.content.view.components.search.renderers
com.adobe.ep.ux.content.view.components.searchpod
com.adobe.ep.ux.content.view.components.toolbar
com.adobe.ep.ux.content.view.components.toolbar.controlRenderers
com.adobe.ep.ux.content.view.components.version
com.adobe.ep.ux.documentsubmit.component
com.adobe.ep.ux.documentsubmit.domain
com.adobe.ep.ux.documentsubmit.skin
com.adobe.ep.ux.taskaction.component
com.adobe.ep.ux.taskaction.domain
com.adobe.ep.ux.taskaction.domain.events
com.adobe.ep.ux.taskaction.skin
com.adobe.ep.ux.taskdetails.component
com.adobe.ep.ux.taskdetails.domain
com.adobe.ep.ux.taskdetails.skin
com.adobe.ep.ux.tasklist.component
com.adobe.ep.ux.tasklist.domain
com.adobe.ep.ux.tasklist.skin
com.adobe.ep.ux.webdocumentviewer.domain
com.adobe.exm.expression
com.adobe.exm.expression.error
com.adobe.exm.expression.event
com.adobe.exm.expression.impl
com.adobe.fiber.runtime.lib
com.adobe.fiber.services
com.adobe.fiber.services.wrapper
com.adobe.fiber.styles
com.adobe.fiber.util
com.adobe.fiber.valueobjects
com.adobe.gravity.binding
com.adobe.gravity.context
com.adobe.gravity.flex.bundleloader
com.adobe.gravity.flex.progress
com.adobe.gravity.flex.serviceloader
com.adobe.gravity.framework
com.adobe.gravity.init
com.adobe.gravity.service.bundleloader
com.adobe.gravity.service.logging
com.adobe.gravity.service.manifest
com.adobe.gravity.service.progress
com.adobe.gravity.tracker
com.adobe.gravity.ui
com.adobe.gravity.utility
com.adobe.gravity.utility.async
com.adobe.gravity.utility.error
com.adobe.gravity.utility.events
com.adobe.gravity.utility.factory
com.adobe.gravity.utility.flex.async
com.adobe.gravity.utility.logging
com.adobe.gravity.utility.message
com.adobe.gravity.utility.sequence
com.adobe.gravity.utility.url
com.adobe.guides.control
com.adobe.guides.domain
com.adobe.guides.i18n
com.adobe.guides.spark.components.skins
com.adobe.guides.spark.components.skins.mx
com.adobe.guides.spark.headers.components
com.adobe.guides.spark.headers.skins
com.adobe.guides.spark.layouts.components
com.adobe.guides.spark.layouts.skins
com.adobe.guides.spark.navigators.components
com.adobe.guides.spark.navigators.renderers
com.adobe.guides.spark.navigators.skins
com.adobe.guides.spark.util
com.adobe.guides.spark.wrappers.components
com.adobe.guides.spark.wrappers.skins
com.adobe.guides.submit
com.adobe.icc.dc.domain
com.adobe.icc.dc.domain.factory
com.adobe.icc.editors.events
com.adobe.icc.editors.handlers
com.adobe.icc.editors.managers
com.adobe.icc.editors.model
com.adobe.icc.editors.model.config
com.adobe.icc.editors.model.el
com.adobe.icc.editors.model.el.operands
com.adobe.icc.editors.model.el.operators
com.adobe.icc.enum
com.adobe.icc.external.dc
com.adobe.icc.obj
com.adobe.icc.services
com.adobe.icc.services.category
com.adobe.icc.services.config
com.adobe.icc.services.download
com.adobe.icc.services.export
com.adobe.icc.services.external
com.adobe.icc.services.formbridge
com.adobe.icc.services.fragmentlayout
com.adobe.icc.services.layout
com.adobe.icc.services.letter
com.adobe.icc.services.locator
com.adobe.icc.services.module
com.adobe.icc.services.render
com.adobe.icc.services.submit
com.adobe.icc.services.user
com.adobe.icc.token
com.adobe.icc.vo
com.adobe.icc.vo.render
com.adobe.icomm.assetplacement.controller
com.adobe.icomm.assetplacement.controller.utils
com.adobe.icomm.assetplacement.data
com.adobe.icomm.assetplacement.model
com.adobe.livecycle.assetmanager.client
com.adobe.livecycle.assetmanager.client.event
com.adobe.livecycle.assetmanager.client.handler
com.adobe.livecycle.assetmanager.client.managers
com.adobe.livecycle.assetmanager.client.model
com.adobe.livecycle.assetmanager.client.model.cms
com.adobe.livecycle.assetmanager.client.service
com.adobe.livecycle.assetmanager.client.service.search
com.adobe.livecycle.assetmanager.client.service.search.cms
com.adobe.livecycle.assetmanager.client.utils
com.adobe.livecycle.content
com.adobe.livecycle.rca.model
com.adobe.livecycle.rca.model.constant
com.adobe.livecycle.rca.model.document
com.adobe.livecycle.rca.model.participant
com.adobe.livecycle.rca.model.reminder
com.adobe.livecycle.rca.model.stage
com.adobe.livecycle.rca.service
com.adobe.livecycle.rca.service.core
com.adobe.livecycle.rca.service.core.delegate
com.adobe.livecycle.rca.service.process
com.adobe.livecycle.rca.service.process.delegate
com.adobe.livecycle.rca.token
com.adobe.livecycle.ria.security.api
com.adobe.livecycle.ria.security.service
com.adobe.mosaic.layouts
com.adobe.mosaic.layouts.dragAndDrop
com.adobe.mosaic.layouts.interfaces
com.adobe.mosaic.mxml
com.adobe.mosaic.om.constants
com.adobe.mosaic.om.events
com.adobe.mosaic.om.impl
com.adobe.mosaic.om.interfaces
com.adobe.mosaic.skinning
com.adobe.mosaic.sparklib.editors
com.adobe.mosaic.sparklib.optionMenu
com.adobe.mosaic.sparklib.scrollableMenu
com.adobe.mosaic.sparklib.scrollableMenu.skins
com.adobe.mosaic.sparklib.tabLayout
com.adobe.mosaic.sparklib.tabLayout.events
com.adobe.mosaic.sparklib.tabLayout.layouts
com.adobe.mosaic.sparklib.tabLayout.skins
com.adobe.mosaic.sparklib.text
com.adobe.mosaic.sparklib.util
com.adobe.solutions.acm.authoring.presentation
com.adobe.solutions.acm.authoring.presentation.actionbar
com.adobe.solutions.acm.authoring.presentation.common
com.adobe.solutions.acm.authoring.presentation.events
com.adobe.solutions.acm.authoring.presentation.fragment
com.adobe.solutions.acm.authoring.presentation.letter
com.adobe.solutions.acm.authoring.presentation.letter.data
com.adobe.solutions.acm.authoring.presentation.preview
com.adobe.solutions.acm.authoring.presentation.rte
com.adobe.solutions.acm.ccr.presentation
com.adobe.solutions.acm.ccr.presentation.contentcapture
com.adobe.solutions.acm.ccr.presentation.contentcapture.events
com.adobe.solutions.acm.ccr.presentation.contentcapture.preview
com.adobe.solutions.acm.ccr.presentation.datacapture
com.adobe.solutions.acm.ccr.presentation.datacapture.renderers
com.adobe.solutions.acm.ccr.presentation.pdf
com.adobe.solutions.exm
com.adobe.solutions.exm.authoring
com.adobe.solutions.exm.authoring.components.controls
com.adobe.solutions.exm.authoring.components.toolbars
com.adobe.solutions.exm.authoring.domain
com.adobe.solutions.exm.authoring.domain.expression
com.adobe.solutions.exm.authoring.domain.impl
com.adobe.solutions.exm.authoring.domain.method
com.adobe.solutions.exm.authoring.domain.variable
com.adobe.solutions.exm.authoring.enum
com.adobe.solutions.exm.authoring.events
com.adobe.solutions.exm.authoring.model
com.adobe.solutions.exm.authoring.renderer
com.adobe.solutions.exm.authoring.view
com.adobe.solutions.exm.expression
com.adobe.solutions.exm.impl
com.adobe.solutions.exm.impl.method
com.adobe.solutions.exm.method
com.adobe.solutions.exm.mock
com.adobe.solutions.exm.mock.method
com.adobe.solutions.exm.runtime
com.adobe.solutions.exm.runtime.impl
com.adobe.solutions.exm.variable
com.adobe.solutions.prm.constant
com.adobe.solutions.prm.domain
com.adobe.solutions.prm.domain.factory
com.adobe.solutions.prm.domain.impl
com.adobe.solutions.prm.domain.manager
com.adobe.solutions.prm.presentation.asset
com.adobe.solutions.prm.presentation.constant
com.adobe.solutions.prm.presentation.document
com.adobe.solutions.prm.presentation.event
com.adobe.solutions.prm.presentation.file
com.adobe.solutions.prm.presentation.project
com.adobe.solutions.prm.presentation.team
com.adobe.solutions.prm.presentation.util
com.adobe.solutions.prm.service
com.adobe.solutions.prm.services.impl
com.adobe.solutions.prm.vo
com.adobe.solutions.rca.constant
com.adobe.solutions.rca.domain
com.adobe.solutions.rca.domain.common
com.adobe.solutions.rca.domain.factory
com.adobe.solutions.rca.domain.impl
com.adobe.solutions.rca.domain.impl.manager
com.adobe.solutions.rca.domain.manager
com.adobe.solutions.rca.presentation
com.adobe.solutions.rca.presentation.comment
com.adobe.solutions.rca.presentation.constant
com.adobe.solutions.rca.presentation.event
com.adobe.solutions.rca.presentation.gantt
com.adobe.solutions.rca.presentation.gantt.ruler
com.adobe.solutions.rca.presentation.template
com.adobe.solutions.rca.presentation.template.audit
com.adobe.solutions.rca.presentation.template.definition
com.adobe.solutions.rca.presentation.template.documents
com.adobe.solutions.rca.presentation.template.stages
com.adobe.solutions.rca.presentation.util
com.adobe.solutions.rca.service
com.adobe.solutions.rca.services.impl
com.adobe.solutions.rca.vo
com.adobe.solutions.rca.vo.um
com.adobe.viewsource
fl.accessibility
fl.containers
fl.controls
fl.controls.dataGridClasses
fl.controls.listClasses
fl.controls.progressBarClasses
fl.core
fl.data
fl.display
fl.events
fl.ik
fl.lang
fl.livepreview
fl.managers
fl.motion
fl.motion.easing
fl.rsl
fl.text
fl.transitions
fl.transitions.easing
fl.video
flash.accessibility
flash.concurrent
flash.crypto
flash.data
flash.desktop
flash.display
flash.display3D
flash.display3D.textures
flash.errors
flash.events
flash.external
flash.filesystem
flash.filters
flash.geom
flash.globalization
flash.html
flash.media
flash.net
flash.net.dns
flash.net.drm
flash.notifications
flash.permissions
flash.printing
flash.profiler
flash.sampler
flash.security
flash.sensors
flash.system
flash.text
flash.text.engine
flash.text.ime
flash.ui
flash.utils
flash.xml
flashx.textLayout
flashx.textLayout.compose
flashx.textLayout.container
flashx.textLayout.conversion
flashx.textLayout.edit
flashx.textLayout.elements
flashx.textLayout.events
flashx.textLayout.factory
flashx.textLayout.formats
flashx.textLayout.operations
flashx.textLayout.utils
flashx.undo
ga.controls
ga.layouts
ga.model
ga.uiComponents
ga.util
ga.views
ga.wrappers
lc.foundation
lc.foundation.domain
lc.foundation.events
lc.foundation.ui
lc.foundation.util
lc.preloader
lc.procmgmt
lc.procmgmt.commands
lc.procmgmt.domain
lc.procmgmt.events
lc.procmgmt.formbridge
lc.procmgmt.impl
lc.procmgmt.ui.attachments
lc.procmgmt.ui.controls
lc.procmgmt.ui.controls.card
lc.procmgmt.ui.controls.renderer
lc.procmgmt.ui.help
lc.procmgmt.ui.layout
lc.procmgmt.ui.presentationmodel
lc.procmgmt.ui.process
lc.procmgmt.ui.search
lc.procmgmt.ui.startpoint
lc.procmgmt.ui.task
lc.procmgmt.ui.task.form
lc.procmgmt.ui.task.form.commands
lc.procmgmt.ui.tracking
mx.accessibility
mx.automation
mx.automation.air
mx.automation.delegates
mx.automation.delegates.advancedDataGrid
mx.automation.delegates.charts
mx.automation.delegates.containers
mx.automation.delegates.controls
mx.automation.delegates.controls.dataGridClasses
mx.automation.delegates.controls.fileSystemClasses
mx.automation.delegates.core
mx.automation.delegates.flashflexkit
mx.automation.events
mx.binding
mx.binding.utils
mx.charts
mx.charts.chartClasses
mx.charts.effects
mx.charts.effects.effectClasses
mx.charts.events
mx.charts.renderers
mx.charts.series
mx.charts.series.items
mx.charts.series.renderData
mx.charts.styles
mx.collections
mx.collections.errors
mx.containers
mx.containers.accordionClasses
mx.containers.dividedBoxClasses
mx.containers.errors
mx.containers.utilityClasses
mx.controls
mx.controls.advancedDataGridClasses
mx.controls.dataGridClasses
mx.controls.listClasses
mx.controls.menuClasses
mx.controls.olapDataGridClasses
mx.controls.scrollClasses
mx.controls.sliderClasses
mx.controls.textClasses
mx.controls.treeClasses
mx.controls.videoClasses
mx.core
mx.core.windowClasses
mx.data
mx.data.crypto
mx.data.errors
mx.data.events
mx.data.messages
mx.data.mxml
mx.data.offline.errors
mx.data.utils
mx.effects
mx.effects.easing
mx.effects.effectClasses
mx.events
mx.filters
mx.flash
mx.formatters
mx.geom
mx.graphics
mx.graphics.codec
mx.graphics.shaderClasses
mx.logging
mx.logging.errors
mx.logging.targets
mx.managers
mx.messaging
mx.messaging.channels
mx.messaging.config
mx.messaging.errors
mx.messaging.events
mx.messaging.management
mx.messaging.messages
mx.modules
mx.netmon
mx.olap
mx.olap.aggregators
mx.preloaders
mx.printing
mx.resources
mx.rpc
mx.rpc.events
mx.rpc.http
mx.rpc.http.mxml
mx.rpc.livecycle
mx.rpc.mxml
mx.rpc.remoting
mx.rpc.remoting.mxml
mx.rpc.soap
mx.rpc.soap.mxml
mx.rpc.wsdl
mx.rpc.xml
mx.skins
mx.skins.halo
mx.skins.spark
mx.skins.wireframe
mx.skins.wireframe.windowChrome
mx.states
mx.styles
mx.utils
mx.validators
org.osmf.containers
org.osmf.display
org.osmf.elements
org.osmf.events
org.osmf.layout
org.osmf.logging
org.osmf.media
org.osmf.metadata
org.osmf.net
org.osmf.net.dvr
org.osmf.net.httpstreaming
org.osmf.net.metrics
org.osmf.net.qos
org.osmf.net.rtmpstreaming
org.osmf.net.rules
org.osmf.traits
org.osmf.utils
spark.accessibility
spark.automation.delegates
spark.automation.delegates.components
spark.automation.delegates.components.gridClasses
spark.automation.delegates.components.mediaClasses
spark.automation.delegates.components.supportClasses
spark.automation.delegates.skins.spark
spark.automation.events
spark.collections
spark.components
spark.components.calendarClasses
spark.components.gridClasses
spark.components.mediaClasses
spark.components.supportClasses
spark.components.windowClasses
spark.core
spark.effects
spark.effects.animation
spark.effects.easing
spark.effects.interpolation
spark.effects.supportClasses
spark.events
spark.filters
spark.formatters
spark.formatters.supportClasses
spark.globalization
spark.globalization.supportClasses
spark.layouts
spark.layouts.supportClasses
spark.managers
spark.modules
spark.preloaders
spark.primitives
spark.primitives.supportClasses
spark.skins
spark.skins.mobile
spark.skins.mobile.supportClasses
spark.skins.spark
spark.skins.spark.mediaClasses.fullScreen
spark.skins.spark.mediaClasses.normal
spark.skins.spark.windowChrome
spark.skins.wireframe
spark.skins.wireframe.mediaClasses
spark.skins.wireframe.mediaClasses.fullScreen
spark.transitions
spark.utils
spark.validators
spark.validators.supportClasses
xd.core.axm.enterprise.view.components
xd.core.axm.enterprise.view.skins
xd.core.axm.view.components
xd.core.axm.view.components.support

語言元素

全域常數
全域函數
運算子
陳述式、關鍵字和指令
特殊類型

附錄

新增內容
編譯器錯誤
編譯器警告
執行階段錯誤
移轉至 ActionScript 3
支援的字元集
僅限 MXML 標籤
移動 XML 元素
Timed Text 標籤
不建議元素清單
AccessibilityImplementation 常數
如何使用 ActionScript 範例
法律聲明
套件air.update
類別public class ApplicationUpdaterUI
繼承ApplicationUpdaterUI Inheritance EventDispatcher Inheritance Object

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

ApplicationUpdaterUI 類別可為 Adobe® AIR® 應用程式定義更新架構的基本功能,並且提供預設的使用者介面。(ApplicationUpdater 類別則僅定義更新功能而未實作預設使用者介面)。

此類別已包含在 Adobe AIR SDK 隨附的 applicationupdater_ui.swc 檔案中。applicationupdater_ui.swc 檔案是在 AIR SDK 的 frameworks/libs/air 目錄中。在 AIR 2 SDK 之 frameworks/libs/air 目錄中的版本是供 Flex 4 開發使用。如果您使用 Flex 3,請使用 frameworks/libs/air/flex3 子目錄中的版本。

Adobe® Flex™ Builder™ 會在您建立 Adobe AIR 的專案時,自動載入這個類別。使用 Adobe® Flex™ SDK 編譯應用程式時,應該包括 SWC 檔案。

管理應用程式的更新可能會很複雜。AIR 更新架構所提供的 API 可協助開發人員為 AIR 應用程式提供完善的更新功能。AIR 更新架構中的功能讓開發人員得以執行下列作業:

  • 根據特定間隔或使用者的要求,定期檢查更新

  • 從網路來源下載 AIR 檔 (更新項目)

  • 在使用者初次執行新安裝的版本時提出警示

  • 確認使用者是否要檢查更新

  • 向使用者顯示新的更新版本相關資訊

  • 向使用者顯示下載進度和錯誤資訊

AIR 更新架構可讓您將 AIR 應用程式更新版本的相關資訊儲存在單純的 XML 組態設定檔中。對大部分應用程式而言,僅需設定這些組態設定檔並加入若干基本程式碼,便能為使用者提供完善的更新功能。

您的應用程式可以使用 AIRUpdateUI 類別所實作的預設使用者介面。此介面為使用者提供了與應用程式更新有關的基本資訊和選項。

更新程序歷經一連串的狀態:

狀態 說明
未初始化更新程式尚未初始化。
正在初始化更新程式正在初始化。
就緒更新程式已完成初始化。
檢查前更新程式尚未檢查更新描述器檔案。
檢查中更新程式正在檢查更新描述器檔案。
可用已有可用的更新描述器檔案。
下載中更新程式正在下載 AIR 檔。
已下載更新程式已經下載 AIR 檔。
安裝中更新程式正在安裝 AIR 檔。
擱置安裝更新程式已完成初始化,且目前尚有擱置的更新。

若是使用 AIR Debug Launcher (ADL) 應用程式來測試應用程式,試圖更新應用程式就會產生 IllegalOperationError 例外。

只有桌面描述檔才支援 AIR 更新架構。延伸的桌面應用程式 (利用原生安裝程式安裝的應用程式) 並不支援,而且行動描述檔 (利用 ActionScript 3.0 編寫的 iPhone 應用程式) 也不支援。在執行階段檢查 Updater.isSupported 屬性,暸解是否支援更新架構。

如需有關使用 AIR 更新架構的詳細資訊,請參閱建立 Adobe AIR 應用程式的「更新 AIR 應用程式」一章。

相關 API 元素



公用屬性
 屬性定義自
      configurationFile : File
設定 delay 和 updateURL 屬性值的組態設定檔所在位置。
ApplicationUpdaterUI
 Inheritedconstructor : Object
類別物件的參照或是特定物件實體的建構函數。
Object
      currentVersion : String
[唯讀] 應用程式的目前版本。
ApplicationUpdaterUI
      delay : Number
定期檢查新的更新之天數間隔。
ApplicationUpdaterUI
      isCheckForUpdateVisible : Boolean
啟用「檢查更新」、「沒有更新」和「更新錯誤」對話方塊的可見性。
ApplicationUpdaterUI
      isDownloadProgressVisible : Boolean
啟用「下載更新」對話方塊的可見性。
ApplicationUpdaterUI
      isDownloadUpdateVisible : Boolean
啟用「下載更新」對話方塊的可見性。
ApplicationUpdaterUI
      isFileUpdateVisible : Boolean
啟用「檔案更新」、「檔案沒有更新」和「檔案錯誤」對話方塊的可見性。
ApplicationUpdaterUI
      isFirstRun : Boolean
[唯讀] 是否為成功更新後第一次執行 (true = 是,false = 否)。
ApplicationUpdaterUI
      isInstallUpdateVisible : Boolean
啟用「安裝更新」對話方塊的可見性。
ApplicationUpdaterUI
      isNewerVersionFunction : Function
更新程式用來執行版本比較的函數。
ApplicationUpdaterUI
      isUnexpectedErrorVisible : Boolean
啟用「未預期的錯誤」對話方塊的可見性。
ApplicationUpdaterUI
      isUpdateInProgress : Boolean
[唯讀] Boolean 屬性,如果更新正在執行即為 true,否則為 false。
ApplicationUpdaterUI
      localeChain : Array
定義使用者介面所使用之地區鏈結的陣列。
ApplicationUpdaterUI
      previousApplicationStorageDirectory : File
[唯讀] 應用程式儲存目錄先前的位置 (若該位置於更新後有所變更)。
ApplicationUpdaterUI
      previousVersion : String
[唯讀] 應用程式的上一個版本。
ApplicationUpdaterUI
      updateDescriptor : XML
[唯讀] 從更新 URL 下載之更新描述器檔案的內容。
ApplicationUpdaterUI
      updateURL : String
更新描述器檔案的位置。
ApplicationUpdaterUI
      wasPendingUpdate : Boolean
[唯讀] 是否有延緩 (包括安裝失敗) 的更新 (true = 是,false = 否)。
ApplicationUpdaterUI
公用方法
 方法定義自
  
建構函數。
ApplicationUpdaterUI
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。
EventDispatcher
  
    addResources(lang:String, res:Object):void
動態地新增指定語言的新資源組合包。
ApplicationUpdaterUI
  
    cancelUpdate():void
取消更新程序。
ApplicationUpdaterUI
  
    checkNow():void
啟動更新程序。
ApplicationUpdaterUI
 Inherited
會將事件傳送到事件流程。
EventDispatcher
 Inherited
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。
EventDispatcher
 Inherited
指出物件是否有已定義的指定屬性。
Object
  
    initialize():void
初始化更新程式。
ApplicationUpdaterUI
  
使用本機 AIR 檔啟動更新程序。
ApplicationUpdaterUI
 Inherited
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。
Object
 Inherited
指出指定的屬性是否存在,以及是否可列舉。
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
會從 EventDispatcher 物件移除偵聽程式。
EventDispatcher
 Inherited
為迴圈作業設定動態屬性的可用性。
Object
 Inherited
傳回代表此物件的字串,根據地區特定慣例進行格式化。
Object
 Inherited
會傳回指定之物件的字串形式。
Object
 Inherited
會傳回指定之物件的基本值。
Object
 Inherited
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。
EventDispatcher
事件
 事件 摘要 定義自
 Inherited[廣播事件] 當 Flash Player 或 AIR 應用程式取得作業系統焦點並成為作用中時傳送。EventDispatcher
  在呼叫 installUpdate() 方法後,將要安裝更新之前傳送。ApplicationUpdaterUI
  在更新程式嘗試下載更新描述器檔案 (更新程序將要開始) 之前傳送。ApplicationUpdaterUI
 Inherited[廣播事件] 當 Flash Player 或 AIR 應用程式失去作業系統焦點並成為非作用中時傳送。EventDispatcher
  當更新檔案下載完成時傳送。ApplicationUpdaterUI
  若在連線或下載更新檔案時發生錯誤,便會傳送。ApplicationUpdaterUI
  在呼叫 downloadUpdate() 方法及建立伺服器連線之後傳送。ApplicationUpdaterUI
  
    error
若在初始化或更新程序期間發生錯誤 (發生未預期的事件),便會傳送。ApplicationUpdaterUI
  若在驗證 installFromAIRFile() 方法呼叫中的 airFile 參數所傳遞的檔案時發生錯誤,便會傳送。ApplicationUpdaterUI
  在更新程式成功驗證 installFromAIRFile() 方法呼叫中的檔案之後傳送。ApplicationUpdaterUI
  
    initialized
在初始化完成後傳送。ApplicationUpdaterUI
  
    progress
下載更新檔案時傳送。ApplicationUpdaterUI
  
    updateError
若在嘗試下載或剖析更新描述器檔案時發生錯誤,便會傳送。ApplicationUpdaterUI
  
    updateStatus
在更新程式成功下載並解譯更新描述器檔案之後傳送。ApplicationUpdaterUI
屬性詳細資訊
    

configurationFile

屬性
configurationFile:File

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

設定 delayupdateURL 屬性值的組態設定檔所在位置。該檔案中的設定也將決定應用程式是否在更新程序期間顯示各種確認對話方塊。如果這個屬性指向不存在的檔案,呼叫 initialize() 方法將導致擲出錯誤。

以下是組態設定檔的樣本:

 <?xml version="1.0" encoding="utf-8"?> 
         <configuration xmlns="http://ns.adobe.com/air/framework/update/configuration/1.0" >
           <url>app:/server/update.xml</url>
           <delay>1</delay>
           <defaultUI>
              <dialog name="checkForUpdate" visible="true" />
               <dialog name="downloadUpdate" visible="false" />
               <dialog name="downloadProgress" visible="true" />
               <dialog name="installUpdate" visible="true" />    
           </defaultUI>
        </configuration>

除了載入組態設定檔,您也可以使用 ActionScript 程式碼,設定 ApplicationUpdaterUI 物件的下列屬性:delayisCheckForUpdateVisibleisDownloadProgressVisibleisDownloadUpdateVisibleisFileUpdateVisibleisInstallUpdateVisibleupdateURL 屬性。



實作
    public function get configurationFile():File
    public function set configurationFile(value:File):void

相關 API 元素

    

currentVersion

屬性 
currentVersion:String  [唯讀]

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

應用程式的目前版本。這個屬性是在 initialize() 方法呼叫期間所設定。其值設定為應用程式描述器檔案提供的版本。



實作
    public function get currentVersion():String
    

delay

屬性 
delay:Number

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

定期檢查新的更新之天數間隔。

值為 0 (預設值) 代表計時器非作用中,因而不會執行定期檢查。您可以透過這個屬性或是組態設定檔來設定延遲值。如果同時透過這兩種方式設定其值,將使用以此屬性設定的值。

預設值為 0。



實作
    public function get delay():Number
    public function set delay(value:Number):void

相關 API 元素

    

isCheckForUpdateVisible

屬性 
isCheckForUpdateVisible:Boolean

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

啟用「檢查更新」、「沒有更新」和「更新錯誤」對話方塊的可見性。如果設定為 true,更新程式便會在更新程序期間顯示這些對話方塊。您也可以透過更新組態設定檔設定此值。由這個屬性所設定的值會覆寫更新組態設定檔中的設定。



實作
    public function get isCheckForUpdateVisible():Boolean
    public function set isCheckForUpdateVisible(value:Boolean):void
    

isDownloadProgressVisible

屬性 
isDownloadProgressVisible:Boolean

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

啟用「下載更新」對話方塊的可見性。如果設定為 true,更新程式便會在更新程序期間顯示該對話方塊。您也可以透過更新組態設定檔設定此值。由這個屬性所設定的值會覆寫更新組態設定檔中的設定。



實作
    public function get isDownloadProgressVisible():Boolean
    public function set isDownloadProgressVisible(value:Boolean):void
    

isDownloadUpdateVisible

屬性 
isDownloadUpdateVisible:Boolean

執行階段版本: AIR 1.5

啟用「下載更新」對話方塊的可見性。如果設定為 true,更新程式便會在更新程序期間顯示這些對話方塊。您也可以透過更新組態設定檔設定此值。由這個屬性所設定的值會覆寫更新組態設定檔中的設定。



實作
    public function get isDownloadUpdateVisible():Boolean
    public function set isDownloadUpdateVisible(value:Boolean):void
    

isFileUpdateVisible

屬性 
isFileUpdateVisible:Boolean

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

啟用「檔案更新」、「檔案沒有更新」和「檔案錯誤」對話方塊的可見性。如果設定為 true,更新程式便會在更新程序期間顯示這些對話方塊。您也可以透過更新組態設定檔設定此值。由這個屬性所設定的值會覆寫更新組態設定檔中的設定。



實作
    public function get isFileUpdateVisible():Boolean
    public function set isFileUpdateVisible(value:Boolean):void
    

isFirstRun

屬性 
isFirstRun:Boolean  [唯讀]

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

是否為成功更新後第一次執行 (true = 是,false = 否)。更新程式會在 initialize() 方法呼叫期間設定此值。若因版本變更而需要移轉資料,開發人員即應檢查 isFirstRun 是否已設定為 true



實作
    public function get isFirstRun():Boolean

相關 API 元素

    

isInstallUpdateVisible

屬性 
isInstallUpdateVisible:Boolean

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

啟用「安裝更新」對話方塊的可見性。如果設定為 true,更新程式便會在更新程序期間顯示該對話方塊。您也可以透過更新組態設定檔設定此值。由這個屬性所設定的值會覆寫更新組態設定檔中的設定。



實作
    public function get isInstallUpdateVisible():Boolean
    public function set isInstallUpdateVisible(value:Boolean):void
    

isNewerVersionFunction

屬性 
isNewerVersionFunction:Function

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

更新程式用來執行版本比較的函數。根據預設,更新架構會進行版本比較,以偵測來自遠端網站的版本是否比已安裝應用程式的版本新。但是,預設的比較方式有時並不符合開發人員的版本設定配置。設定這個屬性可提供另一函數以進行比較。

預設的比較函數接受 x.y.z 之類的版本,其中 x、y 和 z 可包含字母及數字。預設的比較函數也能辨識某些特殊狀況。如果測試函數在版本字串中發現 "alpha""beta""rc",其順序即為 alpha < beta < rc



實作
    public function get isNewerVersionFunction():Function
    public function set isNewerVersionFunction(value:Function):void

範例  ( 如何使用本範例 )
下列程式碼定義了自訂函數 customFnappUpdate 更新程式物件使用。此範例函數刻意單純化。您的自訂函數應該根據版本設定配置的規則傳回 Boolean 值。
appUpdate.isNewerVersionFunction = customFn; 

function customFn (currentVersion:String, updateVersion:String):Boolean 
{
    return updateVersion > currentVersion;
}
    

isUnexpectedErrorVisible

屬性 
isUnexpectedErrorVisible:Boolean

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

啟用「未預期的錯誤」對話方塊的可見性。如果設定為 true,應用程式更新程式便會在更新程序期間顯示該對話方塊。您也可以透過更新組態設定檔設定此值。由這個屬性所設定的值會覆寫更新組態設定檔中的設定。



實作
    public function get isUnexpectedErrorVisible():Boolean
    public function set isUnexpectedErrorVisible(value:Boolean):void
    

isUpdateInProgress

屬性 
isUpdateInProgress:Boolean  [唯讀]

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

Boolean 屬性,如果更新正在執行即為 true,否則為 false



實作
    public function get isUpdateInProgress():Boolean
    

localeChain

屬性 
localeChain:Array

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

定義使用者介面所使用之地區鏈結的陣列。通常,只有 JavaScript (HTML) 開發人員會用到這個屬性。

Flex 開發人員可以使用 ResourceManager 處理地區鏈結。

預設情況下,HTML 類型應用程式會將其語言排序為介於 Capabilities.languages 陣列內的語言以及使用者介面支援的 10 種語言之間。如果找不到相符的語言,使用者介面就會使用英文。

下列 JavaScript 範例使用了 AIR SDK 所提供的 AIR HTML 當地語系化架構。此範例先依據語言清單將語言排序,再將英文設定為預設的後援語言:

 appUpdater.addResources("ro_RO", {titleCheck: "Titlu", msgCheck: "Mesaj", btnCheck: "Buton"});
        appUpdater.addResources("hu", {titleCheck: "Cím", msgCheck: "Üzenet"}); 
        var languages = ["ro", "hu"];
        languages = languages.concat(air.Capabilities.languages);
        var sortedLanguages = air.Localizer.sortLanguagesByPreference(languages, air.Capabilities.language, "en-US");  
        sortedLanguages.push("en-US");
        appUpdater.localeChain = sortedLanguages;



實作
    public function get localeChain():Array
    public function set localeChain(value:Array):void

相關 API 元素

    

previousApplicationStorageDirectory

屬性 
previousApplicationStorageDirectory:File  [唯讀]

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

應用程式儲存目錄先前的位置 (若該位置於更新後有所變更)。經由憑證移轉方式進行升級後,應用程式儲存目錄的位置就會變更。如果未經憑證移轉,使用者更新應用程式將不會造成應用程式儲存目錄變更,此時這個屬性即設定為 null。這個屬性是在 initialize() 方法呼叫期間所設定。

如果開發人員使用 ADT 搭配 -migrate 選項封裝 AIR 檔,即可使用新的憑證來簽署新版本的 AIR 應用程式。新版本的 AIR 應用程式若是使用新的簽署憑證,應用程式的本機儲存目錄將隨著使用者安裝新版本而變更。利用這個屬性可將舊的應用程式儲存目錄中的資料傳輸到新的應用程式儲存目錄 (File.applicationStorageDirectory)。如需詳細資訊,請參閱「Adobe AIR 開發人員指南」中,「使用命令列工具建立 AIR 應用程式」一章的「簽署 AIR 檔以變更應用程式憑證」。



實作
    public function get previousApplicationStorageDirectory():File
    

previousVersion

屬性 
previousVersion:String  [唯讀]

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

應用程式的上一個版本。這個屬性是在 initialize() 方法呼叫期間所設定。傳回應用程式升級前的「上一個版本」(只有在 isfirstRuntrue 時才會設定);否則將設定為 null



實作
    public function get previousVersion():String
    

updateDescriptor

屬性 
updateDescriptor:XML  [唯讀]

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

從更新 URL 下載之更新描述器檔案的內容。當更新程式物件傳送 updateStatus 事件後,這個屬性才為非 null。



實作
    public function get updateDescriptor():XML
    

updateURL

屬性 
updateURL:String

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

更新描述器檔案的位置。接受任何有效的 URLRequest 路徑位置。更新程式必要的強制性設定惟獨此項。您可以透過這個屬性或是組態設定檔來設定更新 URL。如果同時透過這兩種方式設定其值,更新程式會使用以此屬性設定的值。



實作
    public function get updateURL():String
    public function set updateURL(value:String):void

相關 API 元素

    

wasPendingUpdate

屬性 
wasPendingUpdate:Boolean  [唯讀]

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

是否有延緩 (包括安裝失敗) 的更新 (true = 是,false = 否)。更新程式會在 initialize() 方法呼叫期間設定這個屬性。使用 wasPendingUpdateisFirstRun 屬性可檢查是否有任何更新安裝失敗 (若 wasPendingUpdate 設定為 trueisFirstRun 設定為 false 即表示有此情況)。



實作
    public function get wasPendingUpdate():Boolean

相關 API 元素

建構函式詳細資料
    

ApplicationUpdaterUI

()建構函式
public function ApplicationUpdaterUI()

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

建構函數。

方法詳細資訊

    addResources

()方法
public function addResources(lang:String, res:Object):void

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

動態地新增指定語言的新資源組合包。此方法讓 JavaScript 開發人員能為應用程式更新程式使用者介面的對話方塊動態地新增顯示語言 (Flex 開發人員則可直接將新的語言加入 "ApplicationUpdaterDialogs" 資源組合包)。

參數

lang:String — 語言碼 (例如 "ro" 代表羅馬尼亞文)。
 
res:Object — 包含翻譯機碼和值的物件。機碼係取自語言屬性檔案。下表列出各種可能的機碼 (屬性名稱)。

Key 繁體中文值 對話方塊 說明
appWidth 530 全部 對話方塊的寬度。
titleWindow 更新: 全部 在原生視窗標題列上,顯示於應用程式名稱前的文字。
titleCheck 檢查更新 檢查更新 對話方塊標題。
msgCheck 是否允許應用程式檢查更新? 檢查更新 對話方塊訊息。
btnCheck 檢查更新 檢查更新 「檢查更新」按鈕標籤。
btnCancel 取消 具有「取消」按鈕的所有對話方塊。 「取消」按鈕標籤。
titleCheckNoUpdates 沒有可供使用的更新 檢查更新 - 沒有可供使用的更新 對話方塊標題。
msgCheckNoUpdates 目前沒有可供應用程式使用的更新。 檢查更新 - 沒有可供使用的更新 對話方塊訊息。
btnClose 關閉 具有「關閉」按鈕的所有對話方塊。 「關閉」按鈕標籤。
titleCheckError 更新錯誤 檢查更新 - 連線錯誤 對話方塊標題。
msgCheckError 檢查更新時發生錯誤。錯誤# {0} 檢查更新 - 連線錯誤 對話方塊訊息。{0} 將以錯誤 ID 取代。
titleUpdate 可供使用的更新 可供使用的更新 對話方塊標題。
msgUpdate 應用程式的更新版本已可供下載。 可供使用的更新 對話方塊訊息。
lblApplication 應用程式: 可供使用的更新 顯示於應用程式名稱前的標籤。
lblInstalledVersion 已安裝的版本: 可供使用的更新 顯示於已安裝版本前的標籤。
lblAvailableVersion 更新版本: 可供使用的更新 顯示於更新版本前的標籤。
btnDownload 立即下載 可供使用的更新 「立即下載」按鈕標籤。
btnDownloadLater 稍後下載 可供使用的更新 「稍後下載」按鈕標籤。
lnkReleaseNotes 版本說明 具有「版本說明」連結的所有對話方塊。 「版本說明」連結名稱。
titleProgress 下載進度... 下載進度 對話方塊標題。
msgProgress 正在下載更新 下載進度 對話方塊訊息。
titleDownloadError 下載失敗 下載錯誤 對話方塊標題。
msgDownloadError 下載更新時發生錯誤。錯誤# {0} 下載錯誤 對話方塊訊息。{0} 將以錯誤 ID 取代。
titleInstall 安裝更新 安裝更新 對話方塊標題。
msgInstall 應用程式的更新已下載且可供安裝。 安裝更新 對話方塊訊息。
btnInstall 立即安裝 安裝更新 「立即安裝」按鈕標籤。
btnInstallLater 延遲至重新啟動 安裝更新 「延遲至重新啟動」按鈕標籤。
titleFileUpdate 可供使用的更新 檔案 - 可供使用的更新 對話方塊標題。
msgFileUpdate 檔案包含更新版的應用程式。是否安裝? 檔案 - 可供使用的更新 對話方塊訊息。
lblFile 檔案: 檔案 - 可供使用的更新 顯示於檔案名稱前的標籤。
titleFileNoUpdate 沒有可供使用的更新 檔案 - 沒有可供使用的更新 對話方塊標題。
msgFileNoUpdate 檔案並未包含版本較新的應用程式。 檔案 - 沒有可供使用的更新 對話方塊訊息。
titleFileError 檔案錯誤 檔案 - 錯誤 對話方塊標題。
msgFileError 驗證更新檔案時發生錯誤。錯誤# {0} 檔案 - 錯誤 對話方塊訊息。{0} 將以錯誤 ID 取代。
titleUnexpectedError 未預期的錯誤 未預期的錯誤 對話方塊標題。
msgUnexpectedError 發生了未預期的錯誤。錯誤# {0} 未預期的錯誤 對話方塊訊息。{0} 將以錯誤 ID 取代。

相關 API 元素

    cancelUpdate

()方法 
public function cancelUpdate():void

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

取消更新程序。呼叫此方法將會取消任何等候中的下載、刪除任何下載不完全的檔案,並重新啟動定期檢查計時器。

只要更新程式不是處於 "uninitialized" 或 "initializing" 狀態,隨時皆可取消更新程序。若為 "uninitialized" 或 "initializing" 狀態,呼叫後不會執行任何動作。

    checkNow

()方法 
public function checkNow():void

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

啟動更新程序。呼叫此方法並不會停止定期計時器,但此方法會偵測是否有更新程序正在執行,並將略過目前的程序循環。

此方法只會在目前狀態為 "Ready" 時執行。

此方法可能導致更新程式物件傳送下列事件:


事件
checkForUpdate:UpdateEvent — 更新程序將要開始之前傳送。

    initialize

()方法 
public function initialize():void

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

初始化更新程式。呼叫此方法將會執行下列動作:

  1. 初始化更新架構,以無訊息方式同步安裝任何擱置的更新。在應用程式啟動時即應呼叫此方法,因為這可能會重新啟動應用程式。

  2. 檢查是否有延緩的更新並加以安裝。

  3. 如果先前的更新曾發生錯誤,即清除儲存區內的更新檔案和版本資訊。

  4. 如果定期計時器延遲已到期,即啟動更新程序;否則將啟動定期計時器。然而,若是使用 AIR Debug Launcher (ADL) 應用程式來測試應用程式,試圖更新應用程式就會產生 IllegalOperationError 例外。


事件
initialized:UpdateEvent — 初始化完成。
 
error:ErrorEvent — 初始化期間發生錯誤。

    installFromAIRFile

()方法 
public function installFromAIRFile(file:File):void

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

使用本機 AIR 檔啟動更新程序。

若有更新程序正在執行 (處於 "Downloaded" 以外的狀態),呼叫此方法將毫無作用。

這項功能對於已將應用程式描述器檔案中的 customUpdateUI 元素設定為 true 的應用程式來說很有用。

使用 AIR Debug Launcher (ADL) 應用程式測試應用程式時,呼叫此方法會產生 IllegalOperationError 例外。

參數

file:File — 即將安裝的本機 AIR 檔。


事件
fileUpdateStatus:StatusFileUpdateEvent — 在更新程式成功驗證 AIR 檔之後傳送。
 
updateError:StatusFileUpdateErrorEvent — 若在嘗試剖析更新描述器檔案時發生錯誤,便會傳送。
事件詳細資訊
    

beforeInstall

事件
事件物件類型: air.update.events.UpdateEvent
屬性 UpdateEvent.type = air.update.events.UpdateEvent.BEFORE_INSTALL

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

在呼叫 installUpdate() 方法後,將要安裝更新之前傳送。有時候,此時暫且不要安裝更新會比較妥當,因為執行階段若結束應用程式準備安裝更新,可能導致使用者遺失所有目前的工作成果。

呼叫此事件的 preventDefault() 方法便能延緩到下次重新啟動才安裝。如果您呼叫了 preventDefault() 方法,則此應用程式工作階段期間將無法再啟動其他更新程序 (藉由呼叫 installUpdate() 方法或因定期檢查而引發)。

UpdateEvent.BEFORE_INSTALL 常數定義了代表 beforeInstall 事件之事件物件的 type 屬性值。

這個事件具有下列屬性:

屬性
bubblesfalse
cancelablefalse;沒有要取消的預設行為指令。
currentTarget正主動使用事件偵聽程式處理 Event 物件的物件。
target更新程式物件。
    

checkForUpdate

事件  
事件物件類型: air.update.events.UpdateEvent
屬性 UpdateEvent.type = air.update.events.UpdateEvent.CHECK_FOR_UPDATE

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

在更新程式嘗試下載更新描述器檔案 (更新程序將要開始) 之前傳送。直接呼叫 checkNow() 方法或定期檢查計時器已到期時,更新程式便會傳送此事件。

UpdateEvent.CHECK_FOR_UPDATE 常數定義了代表 checkForUpdate 事件之事件物件的 type 屬性值。

這個事件具有下列屬性:

屬性
bubblesfalse
cancelablefalse;沒有要取消的預設行為指令。
currentTarget正主動使用事件偵聽程式處理 Event 物件的物件。
target更新程式物件。
    

downloadComplete

事件  
事件物件類型: air.update.events.UpdateEvent
屬性 UpdateEvent.type = air.update.events.UpdateEvent.DOWNLOAD_COMPLETE

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

當更新檔案下載完成時傳送。

UpdateEvent.DOWNLOAD_COMPLETE 常數定義了代表 downloadComplete 事件之事件物件的 type 屬性值。

這個事件具有下列屬性:

屬性
bubblesfalse
cancelablefalse;沒有要取消的預設行為指令。
currentTarget正主動使用事件偵聽程式處理 Event 物件的物件。
target更新程式物件。
    

downloadError

事件  
事件物件類型: air.update.events.DownloadErrorEvent
屬性 DownloadErrorEvent.type = air.update.events.DownloadErrorEvent.DOWNLOAD_ERROR

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

若在連線或下載更新檔案時發生錯誤,便會傳送。若為無效的 HTTP 狀態 (例如「404 - 找不到檔案」),也將傳送此事件。

一旦傳送此事件,即自動重新啟動定期計時器 (如果延遲值大於 0)。

DownloadErrorEvent.DOWNLOAD_ERROR 常數定義了代表 downloadError 事件之事件物件的 type 屬性值。

DownloadErrorEvent 物件的 errorID 屬性為整數,用以定義錯誤資訊 (請參閱下表)。另外可能還有 subErrorID 屬性包含了更多的錯誤資訊。

errorID 錯誤碼說明
16800驗證已下載的更新檔案時所發生。subErrorID 屬性可能包含額外資訊。
16801Adobe AIR 檔無效 (遺漏 application.xml)。
16802Adobe AIR 檔無效 (遺漏 MIME 類型)。
16803Adobe AIR 檔 (格式) 無效。
16804Adobe AIR 檔 (旗標) 無效。
16805Adobe AIR 檔無效 (壓縮方式不明)。
16806Adobe AIR 檔 (檔案名稱) 無效。
16807Adobe AIR 檔無效 (損毀)。
16808組態設定檔不存在。
16809updateURL 屬性未設定。
16810保留。
16811組態設定檔無效 (組態版本不明)。
16812組態設定檔無效 (遺漏 URL)。
16813組態設定檔無效 (延遲格式)。
16814組態設定檔 (defaultUI 值) 無效。
16815更新描述器無效 (描述器版本不明)。
16816更新描述器無效 (遺漏描述器版本)。
16817更新描述器 (描述本身) 無效。
16818儲存資料至磁碟時發生 IO 錯誤。subErrorID 屬性可能提供更多資訊。
16819下載時發生安全性錯誤。subErrorID 屬性可能提供更多資訊。
16820HTTP 狀態碼無效。subErrorID 屬性可能包含了無效的狀態碼。
16821保留。
16822下載時發生 I/O 錯誤。subErrorID 屬性可能提供更多資訊。
16823儲存資料至磁碟時發生檔案結尾錯誤。subErrorID 屬性可能提供更多資訊。
16824更新描述器無效。subErrorID 屬性可能提供更多資訊。
16825更新檔案所包含的應用程式具有不同的應用程式 ID。
16826更新檔案並未包含版本較新的應用程式。
16827更新檔案所包含的版本與更新描述器提供的版本不符。
16828無法更新應用程式,通常是因為應用程式在 AIR Debug Launcher (ADL) 中執行所致。
16829安裝過程中遺失更新檔案。
    

downloadStart

事件  
事件物件類型: air.update.events.UpdateEvent
屬性 UpdateEvent.type = air.update.events.UpdateEvent.DOWNLOAD_START

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

在呼叫 downloadUpdate() 方法及建立伺服器連線之後傳送。使用 ApplicationUpdater 元件庫時,您可以透過此事件的事件處理常式,顯示進度列向使用者報告下載進度。

UpdateEvent.DOWNLOAD_START 常數定義了代表 downloadStart 事件之事件物件的 type 屬性值。

這個事件具有下列屬性:

屬性
bubblesfalse
cancelablefalse;沒有要取消的預設行為指令。
currentTarget正主動使用事件偵聽程式處理 Event 物件的物件。
target更新程式物件。
    

error

事件  
事件物件類型: flash.events.ErrorEvent
屬性 ErrorEvent.type = flash.events.ErrorEvent.ERROR

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

若在初始化或更新程序期間發生錯誤 (發生未預期的事件),便會傳送。

定義 error 事件物件的 type 屬性值。

這個事件具有下列屬性:

屬性
bubblesfalse
cancelablefalse;沒有要取消的預設行為指令。
currentTarget正主動使用事件偵聽程式處理 Event 物件的物件。
target遇到網路作業失敗的物件。
text要顯示為錯誤訊息的文字。
    

fileUpdateError

事件  
事件物件類型: air.update.events.StatusFileUpdateErrorEvent
屬性 StatusFileUpdateErrorEvent.type = air.update.events.StatusFileUpdateErrorEvent.FILE_UPDATE_ERROR

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

若在驗證 installFromAIRFile() 方法呼叫中的 airFile 參數所傳遞的檔案時發生錯誤,便會傳送。

StatusUpdateErrorEvent.UPDATE_ERROR 常數定義了代表 statusUpdateError 事件之事件物件的 type 屬性值。
    

fileUpdateStatus

事件  
事件物件類型: air.update.events.StatusFileUpdateEvent
屬性 StatusFileUpdateEvent.type = air.update.events.StatusFileUpdateEvent.FILE_UPDATE_STATUS

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

在更新程式成功驗證 installFromAIRFile() 方法呼叫中的檔案之後傳送。

StatusUpdateEvent.UPDATE_STATUS 常數定義了代表 updateStatus 事件之事件物件的 type 屬性值。

這個事件具有下列屬性:

屬性
available指出除了目前的應用程式外,是否有其他版本可用;若有即為 true,否則為 false (相同版本)。
path更新 File 物件的 nativePath 屬性,由 installFromAIRFile() 方法呼叫中的 airFile 參數所指定。
version指出新更新的版本。

    

initialized

事件  
事件物件類型: air.update.events.UpdateEvent
屬性 UpdateEvent.type = air.update.events.UpdateEvent.INITIALIZED

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

在初始化完成後傳送。

此事件具有下列唯讀屬性:

  • isFirstRun (Boolean):指出是否為成功更新後第一次執行 (true = 是,false = 否)。

  • previousVersion (String):應用程式升級前的上一個版本 (只有在 isfirstRuntrue 時才會設定)。

  • currentVersion (String):目前已安裝版本的應用程式描述器檔案所提供的版本。

UpdateEvent.INITIALIZED 常數定義了代表 initialized 事件之事件物件的 type 屬性值。

這個事件具有下列屬性:

屬性
bubblesfalse
cancelablefalse;沒有要取消的預設行為指令。
currentTarget正主動使用事件偵聽程式處理 Event 物件的物件。
target更新程式物件。
    

progress

事件  
事件物件類型: flash.events.ProgressEvent
屬性 ProgressEvent.type = flash.events.ProgressEvent.PROGRESS

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

下載更新檔案時傳送。

定義 progress 事件物件的 type 屬性值。

這個事件具有下列屬性:

屬性
bubblesfalse
bytesLoaded在偵聽程式處理事件時,載入的項目或位元組數目。
bytesTotal如果載入程序成功時,最終將載入的項目或位元組總數。
cancelablefalse;沒有要取消的預設行為指令。
currentTarget正主動使用事件偵聽程式處理 Event 物件的物件。
target回報進度的物件。
    

updateError

事件  
事件物件類型: air.update.events.StatusUpdateErrorEvent
屬性 StatusUpdateErrorEvent.type = air.update.events.StatusUpdateErrorEvent.UPDATE_ERROR

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

若在嘗試下載或剖析更新描述器檔案時發生錯誤,便會傳送。

更新程式一旦傳送此事件,即自動重新啟動定期計時器 (如果延遲設定大於 0)。應用程式最好在更新程式傳送新的 checkForUpdate 事件時,隱藏任何錯誤對話方塊。

StatusUpdateErrorEvent.UPDATE_ERROR 常數定義了代表 statusUpdateError 事件之事件物件的 type 屬性值。
    

updateStatus

事件  
事件物件類型: air.update.events.StatusUpdateEvent
屬性 StatusUpdateEvent.type = air.update.events.StatusUpdateEvent.UPDATE_STATUS

語言版本: ActionScript 3.0
執行階段版本: AIR 1.5

在更新程式成功下載並解譯更新描述器檔案之後傳送。

StatusUpdateEvent.UPDATE_STATUS 常數定義了代表 updateStatus 事件之事件物件的 type 屬性值。

這個事件具有下列屬性:

屬性
available設定為 true 表示更新描述器檔案指定的版本與目前的應用程式版本不同,否則為 false (兩者的版本相同)。
version字串,代表可用的新版本.
details陣列,定義每一種支援語言的 details 字串。如果沒有當地語系化描述,此陣列將定義成第一個元素為空字串 (""),第二個元素為 details 字串。若有當地語系化描述,則陣列中的每個元素本身都是包含兩個元素的陣列。第一個元素是地區碼,第二個元素是描述文字。例如,此陣列包含了代表兩種語言 (美式英文和法文) 的子陣列:["en-US", "Hello World"], ["fr", "Bonjour monde"]。語言的列示順序與更新描述器中的順序相同。詳細資訊屬性的文字會在更新描述器檔案中指定。
versionLabel(AIR 2.5+) 來自更新應用程式描述器的版本標籤。應該向使用者顯示版本標籤,而非顯示版本。若未指定版本標籤,此屬性將為空白字串。




[ X ]為什麼顯示英文?
「ActionScript 3.0 參考」的內容是以英文顯示

並非所有「ActionScript 3.0 參考」的內容都翻譯為所有語言。當語言元素未翻譯時,就會以英文顯示。例如,ga.controls.HelpBox 類別並沒有翻譯為任何語言。因此在參考的繁體中文版本中,ga.controls.HelpBox 類別就會以英文顯示。