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

NativeApplication  - 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 範例
法律聲明
套件flash.desktop
類別public final class NativeApplication
繼承NativeApplication Inheritance EventDispatcher Inheritance Object

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

NativeApplication 類別代表這個 AIR 應用程式。

NativeApplication 類別會提供應用程式資訊、整個應用程式的函數,而且會傳送應用程式層級的事件。

NativeApplication 物件是一種 Singleton 物件,會在啟動時自動建立。請使用靜態屬性 NativeApplication.nativeApplication 取得應用程式的 NativeApplication 實體。



公用屬性
 屬性定義自
      activeWindow : NativeWindow
[唯讀] 作用中的應用程式視窗。
NativeApplication
      applicationDescriptor : XML
[唯讀] 此 AIR 應用程式的應用程式描述器檔案內容。
NativeApplication
      applicationID : String
[唯讀] 此應用程式的應用程式 ID。
NativeApplication
      autoExit : Boolean
指定應用程式是否應該在所有視窗都關閉時自動終止。
NativeApplication
 Inheritedconstructor : Object
類別物件的參照或是特定物件實體的建構函數。
Object
      executeInBackground : Boolean
指定應用程式是否將在背景執行。
NativeApplication
      icon : InteractiveIcon
[唯讀] 應用程式圖示。
NativeApplication
      idleThreshold : int
在傳送 userIdle 事件之前,必須經過多久的時間沒有使用者輸入。
NativeApplication
      isCompiledAOT : Boolean
[唯讀] 指定是否針對所要的平台編譯或解譯應用程式。
NativeApplication
      menu : NativeMenu
應用程式選單。
NativeApplication
      nativeApplication : NativeApplication
[靜態] [唯讀] NativeApplication 物件的 Singleton 實體。
NativeApplication
      openedWindows : Array
[唯讀] 包含這個應用程式之所有開啟原生視窗的陣列。
NativeApplication
      publisherID : String
[唯讀] 此應用程式的發行者 ID。
NativeApplication
      runtimePatchLevel : uint
[唯讀] 裝載此應用程式之執行階段的修補程式等級。
NativeApplication
      runtimeVersion : String
[唯讀] 裝載此應用程式之執行階段的版本號碼。
NativeApplication
      startAtLogin : Boolean
指定此應用程式是否會在目前的使用者每次登入時自動啟動。
NativeApplication
      supportsDefaultApplication : Boolean
[靜態] [唯讀] 指示目前的平台是否支援 setAsDefaultApplication()、removeAsDefaultApplication() 以及 isSetAsDefaultApplication()。
NativeApplication
      supportsDockIcon : Boolean
[靜態] [唯讀] 指出 AIR 是否支援在目前的作業系統中使用停駐式應用程式圖示。
NativeApplication
      supportsMenu : Boolean
[靜態] [唯讀] 指定目前的作業系統是否支援全域應用程式選單列。
NativeApplication
      supportsStartAtLogin : Boolean
[靜態] [唯讀] 指示目前的平台是否支援 startAtLogin。
NativeApplication
      supportsSystemTrayIcon : Boolean
[靜態] [唯讀] 指定 AIR 是否支援在目前的作業系統中使用系統匣圖示。
NativeApplication
      systemIdleMode : String
提供一種方法給應用程式,來禁止使用者介面進入「閒置」模式。
NativeApplication
      timeSinceLastUserInput : int
[唯讀] 上一次使用者輸入之後所經過的時間,以秒為單位。
NativeApplication
公用方法
 方法定義自
  
    activate(window:NativeWindow = null):void
啟動此應用程式。
NativeApplication
  
    addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
[覆寫] 會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。
NativeApplication
  
    clear():Boolean
在取得焦點的顯示物件上叫用內部刪除命令。
NativeApplication
  
    copy():Boolean
在取得焦點的顯示物件上叫用內部複製命令。
NativeApplication
  
    cut():Boolean
在取得焦點的顯示物件上叫用內部剪下命令。
NativeApplication
  
    dispatchEvent(event:Event):Boolean
[覆寫] 會將事件傳送到事件流程。
NativeApplication
  
    exit(errorCode:int = 0):void
終止此應用程式。
NativeApplication
  
取得預設應用程式,以便開啟具有指定副檔名的檔案。
NativeApplication
 Inherited
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。
EventDispatcher
 Inherited
指出物件是否有已定義的指定屬性。
Object
 Inherited
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。
Object
  
指定此應用程式目前是否為用於開啟具有指定副檔名之檔案的預設應用程式。
NativeApplication
  
    paste():Boolean
在取得焦點的顯示物件上叫用內部貼上命令。
NativeApplication
 Inherited
指出指定的屬性是否存在,以及是否可列舉。
Object
  
移除此應用程式,使其不再成為開啟具有指定副檔名之檔案的預設應用程式。
NativeApplication
  
    removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
[覆寫] 會從 EventDispatcher 物件移除偵聽程式。
NativeApplication
  
    selectAll():Boolean
在取得焦點的顯示物件上叫用內部全選命令。
NativeApplication
  
將此應用程式設定為用於開啟具有指定副檔名之檔案的預設應用程式。
NativeApplication
 Inherited
為迴圈作業設定動態屬性的可用性。
Object
 Inherited
傳回代表此物件的字串,根據地區特定慣例進行格式化。
Object
 Inherited
會傳回指定之物件的字串形式。
Object
 Inherited
會傳回指定之物件的基本值。
Object
 Inherited
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。
EventDispatcher
事件
 事件 摘要 定義自
  
    activate
在此應用程式成為作用中的桌面應用程式時傳送。NativeApplication
  在使用者瀏覽器中執行的 SWF 檔案叫用應用程式時傳送。NativeApplication
  
    deactivate
在桌面焦點切換至不同的應用程式時傳送。NativeApplication
  
    exiting
當啟動應用程式結束序列時傳送。NativeApplication
  
    invoke
在叫用應用程式時傳送。NativeApplication
  
    keyDown
會當使用者按下按鍵時傳送。NativeApplication
  
    keyUp
會當使用者放開按鍵時傳送。NativeApplication
  在新的網路連線可用之後或是現有的網路連線遺失時傳送。NativeApplication
  
    suspend
當作業系統即將暫停應用程式時傳送。NativeApplication
  
    userIdle
當使用者閒置時傳送。NativeApplication
  
    userPresent
當作業系統在閒置一段時間之後偵測到滑鼠或鍵盤活動時傳送。NativeApplication
屬性詳細資訊
    

activeWindow

屬性
activeWindow:NativeWindow  [唯讀]

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

作用中的應用程式視窗。

如果作用中的桌面視窗不屬於此應用程式,或者沒有任何作用中視窗,activeWindow 就會是 null

在不支援 NativeWindow 類別的平台上,不支援此屬性。



實作
    public function get activeWindow():NativeWindow
    

applicationDescriptor

屬性 
applicationDescriptor:XML  [唯讀]

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

此 AIR 應用程式的應用程式描述器檔案內容。



實作
    public function get applicationDescriptor():XML

範例  ( 如何使用本範例 )
下列程式碼將從應用程式描述器檔案讀取 copyrightversion 元素。請注意,您必須使用應用程式描述器 XML 中定義的預設命名空間。
var appDescriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
var ns:Namespace = appDescriptor.namespace();
var appCopyright:String = appDescriptor.ns::copyright;
var appVersion:String = appDescriptor.ns::version;
trace("appId:", appCopyright);
trace("version:", appVersion);
    

applicationID

屬性 
applicationID:String  [唯讀]

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

此應用程式的應用程式 ID。

此 ID 的值是在應用程式描述器檔案中設定。



實作
    public function get applicationID():String
    

autoExit

屬性 
autoExit:Boolean

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

指定應用程式是否應該在所有視窗都關閉時自動終止。

autoExittrue (預設值) 時,應用程式會在所有視窗關閉時終止,也會傳送 exitingexit 事件。如果 autoExitfalse,則必須呼叫 NativeApplication.nativeApplication.exit() 來終止應用程式。

在不支援 NativeWindow 類別的平台上,不支援此屬性。



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

executeInBackground

屬性 
executeInBackground:Boolean

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

指定應用程式是否將在背景執行。

executeInBackground 為預設值 false,則應用程式在移至背景時會維持暫停狀態。當 executeInBackgroundtrue 時,應用程式會在背景執行。

注意:在 SWF 版本 21 及舊版中,當設定「直接」顯示模式時,AIR 並未支援背景執行。由於這個限制,Stage3D 應用程式無法執行背景工作,例如音效播放、位置更新、網路上傳或下載等。iOS 不允許在背景執行 OpenGLES 或顯示呼叫。嘗試在背景進行 OpenGL 呼叫的應用程式會遭到 iOS 加以終止。Android 並未限制應用程式在背景進行 OpenGLES 呼叫或是執行其他背景工作 (如音效播放)。透過 SWF 版本 22 及更新版本,AIR 行動裝置應用程式可以在已設定 renderMode direct 的情況下在背景執行。如果在背景進行 OpenGLES 呼叫,AIR iOS 執行階段會造成 ActionScript 錯誤 (3768 - 在背景執行期間不會使用 Stage3D API)。不過,在 Android 則不會造成任何錯誤,因為 Android 原生應用程式是可以在背景進行 OpenGLES 呼叫的。為了讓行動裝置資源的運用達到最佳化,當應用程式在背景執行時,請不要進行顯示呼叫。

這個屬性在 AIR iOS 和 Android 受到支援。



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

icon

屬性 
icon:InteractiveIcon  [唯讀]

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

應用程式圖示。

您可以使用 NativeApplication.supportsDockIconNativeApplication.supportsSystemTrayIcon 判斷 icon 類別。此類型將為 InteractiveIcon 的其中一個子類別。在 Mac® OS X 上,NativeApplication.iconDockIcon 類型的物件。在 Windows® 上,NativeApplication.iconSystemTrayIcon 類型的物件。當不支援某個應用程式圖示時,NativeApplication.supportsDockIconNativeApplication.supportsSystemTrayIcon 都為 false,且 icon 屬性為 null

icon 物件是自動建立的,但是不會使用影像資料初始化。在某些作業系統 (例如 Mac OS X) 上,將會提供預設影像。但是在其他作業系統 (如 Windows) 上,除非已為圖示指定影像資料,否則不會顯示圖示。若要指定圖示影像,請使用陣列來設定 icon.bitmaps 屬性,此陣列至少要包含一個 BitmapData 物件。如果此陣列包含一個以上的 BitmapData 物件,則作業系統會選擇在大小上最接近圖示顯示尺寸的影像,並在必要時縮放影像。



實作
    public function get icon():InteractiveIcon

相關 API 元素

    

idleThreshold

屬性 
idleThreshold:int

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

在傳送 userIdle 事件之前,必須經過多久的時間沒有使用者輸入。

依照預設,閒置臨界值為 300 秒 (5 分鐘)。值的可接受範圍是從 5 (5 秒) 到 86,400 (1 天) (含)。



實作
    public function get idleThreshold():int
    public function set idleThreshold(value:int):void

擲回值
ArgumentError — 若您嘗試將屬性設定成無效的值。值的可接受範圍是從 5 (5 秒) 到 86,400 (1 天) (含)。

相關 API 元素

    

isCompiledAOT

屬性 
isCompiledAOT:Boolean  [唯讀]

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

指定是否針對所要的平台編譯或解譯應用程式。這個 API 只針對 iOS 目標 (ipa-app-store、ipa-test、ipa-debug、ipa-ad-hoc) 傳回 (true)。對於其他 AIR 平台,這個 API 則會傳回 (false)。



實作
    public function get isCompiledAOT():Boolean
    

menu

屬性 
menu:NativeMenu

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

應用程式選單。

NativeApplication.supportsMenutrue 時,即支援應用程式選單。並非所有作業系統都支援應用程式選單。例如,Mac OS X 支援應用程式選單,但是 Windows 或 Linux 則不支援。當 NativeApplication.supportsMenufalse 時,您可以將 NativeMenu 物件指派給此屬性,但是不會有任何作用。請務必使用 NativeApplication.supportsMenu 屬性來判斷作業系統是否支援應用程式選單。使用其他方法 (例如 Capabilities.os) 來判斷這種支援是否會造成程式設計錯誤 (如果未考慮到部分可能的目標作業系統)。

AIR 描述檔支援:行動裝置或 AIR for TV 裝置不支援此功能。如需有關跨多個描述檔之 API 支援的詳細資訊,請參閱 AIR 描述檔支援

注意:在 Mac OS X 中,menu 屬性會參考作業系統支援的預設應用程式選單。您可以透過加入和移除項目和子選單以及加入事件偵聽程式,修改現有的選單結構。您也可以將新的 NativeMenu 物件指定給這個 menu 屬性,完全取代預設選單。



實作
    public function get menu():NativeMenu
    public function set menu(value:NativeMenu):void

相關 API 元素

    

nativeApplication

屬性 
nativeApplication:NativeApplication  [唯讀]

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

NativeApplication 物件的 Singleton 實體。



實作
    public static function get nativeApplication():NativeApplication

擲回值
Error — 如果由應用程式安全執行程序外面的內容所存取。
    

openedWindows

屬性 
openedWindows:Array  [唯讀]

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

包含這個應用程式之所有開啟原生視窗的陣列。

在不支援 NativeWindow 類別的平台上,不支援此屬性。



實作
    public function get openedWindows():Array
    

publisherID

屬性 
publisherID:String  [唯讀]

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

此應用程式的發行者 ID。

這個 ID 的值會設定在應用程式的 publisherid 檔案中,這個檔案是在安裝時,由用來簽署應用程式的憑證鏈結所產生。



實作
    public function get publisherID():String
    

runtimePatchLevel

屬性 
runtimePatchLevel:uint  [唯讀]

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

裝載此應用程式之執行階段的修補程式等級。



實作
    public function get runtimePatchLevel():uint
    

runtimeVersion

屬性 
runtimeVersion:String  [唯讀]

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

裝載此應用程式之執行階段的版本號碼。



實作
    public function get runtimeVersion():String
    

startAtLogin

屬性 
startAtLogin:Boolean

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

指定此應用程式是否會在目前的使用者每次登入時自動啟動。

AIR 描述檔支援:所有桌上型電腦作業系統都支援此項功能,但行動裝置或 AIR for TV 裝置不支援。您可以使用 NativeApplication.supportsStartAtLogin 屬性測試執行階段的支援狀況。如需有關跨多個描述檔之 API 支援的詳細資訊,請參閱 AIR 描述檔支援

startAtLogin 屬性會反映作業系統定義之機制的狀態,以指定使用者登入時,應用程式應該自動啟動。使用者可以使用作業系統的使用者介面,手動變更此狀態。不管 AIR 應用程式或作業系統最後是否變更此狀態,此屬性都會反應目前的狀態。



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

擲回值
IllegalOperationError — 在 Windows 中,當同名的另一個應用程式 (但是可執行檔的路徑不同) 已經設定為要在這名使用者登入時啟動。
 
IllegalOperationError — 如果未安裝這個應用程式,這可能是 AIR Debug Launcher (ADL) 所啟動的情況。

相關 API 元素

    

supportsDefaultApplication

屬性 
supportsDefaultApplication:Boolean  [唯讀]

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

指示目前的平台是否支援 setAsDefaultApplication()removeAsDefaultApplication() 以及 isSetAsDefaultApplication()

如果為 true,則上述方法將按照所述執行。如果為 false,則 setAsDefaultApplication()removeDefaultApplication() 不會執行任何動作,而且 isSetAsDefaultApplication() 會傳回 false



實作
    public static function get supportsDefaultApplication():Boolean

相關 API 元素

    

supportsDockIcon

屬性 
supportsDockIcon:Boolean  [唯讀]

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

指出 AIR 是否支援在目前的作業系統中使用停駐式應用程式圖示。

如果為 true,則 NativeApplication.icon 屬性的類型為 DockIcon

Mac OS X 使用者介面為執行中或常用的應用程式提供一種內含圖示的應用程式停駐點。

請務必使用 NativeApplication.supportsDockIcon 屬性來判斷作業系統是否支援應用程式停駐圖示。使用其他方法 (例如 Capabilities.os) 來判斷這種支援是否會造成程式設計錯誤 (如果未考慮到部分可能的目標作業系統)。



實作
    public static function get supportsDockIcon():Boolean

相關 API 元素

    

supportsMenu

屬性 
supportsMenu:Boolean  [唯讀]

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

指定目前的作業系統是否支援全域應用程式選單列。

設定為 true 時,NativeApplication.menu 屬性便可以用來定義 (或存取) 原生應用程式選單。

請務必使用 NativeApplication.supportsMenu 屬性來判斷作業系統是否支援應用程式選單列。使用其他方法 (例如 Capabilities.os) 來判斷這種支援是否會造成程式設計錯誤 (如果未考慮到部分可能的目標作業系統)。



實作
    public static function get supportsMenu():Boolean

相關 API 元素

    

supportsStartAtLogin

屬性 
supportsStartAtLogin:Boolean  [唯讀]

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

指示目前的平台是否支援 startAtLogin。

如果為 true,則 startAtLogin 會按照所述執行。如果為 false,則 startAtLogin 無任何作用。



實作
    public static function get supportsStartAtLogin():Boolean

相關 API 元素

    

supportsSystemTrayIcon

屬性 
supportsSystemTrayIcon:Boolean  [唯讀]

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

指定 AIR 是否支援在目前的作業系統中使用系統匣圖示。

如果為 true,則 NativeApplication.icon 屬性的類型為 SystemTrayIcon

Windows 使用者介面提供工作列的「系統匣」圖示,正式名稱為「通知區域」,應用程式圖示就是顯示在這個地方。未顯示預設圖示。您必須將圖示物件的 bitmaps 陣列設定成顯示圖示。

請務必使用 NativeApplication.supportsSystemTrayIcon 屬性來判斷作業系統是否支援系統匣圖示。使用其他方法 (例如 Capabilities.os) 來判斷這種支援是否會造成程式設計錯誤 (如果未考慮到部分可能的目標作業系統)。



實作
    public static function get supportsSystemTrayIcon():Boolean

相關 API 元素

    

systemIdleMode

屬性 
systemIdleMode:String

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

提供一種方法給應用程式,來禁止使用者介面進入「閒置」模式。

SystemIdleMode 類別的值,用於影響主機系統的閒置模式行為。這個屬性只對包含輸入焦點的應用程式有效,而且只能從應用程式安全執行程序中執行的內容存取。

AIR 描述檔支援:行動裝置支援此項功能,但桌上型電腦作業系統或 AIR for TV 裝置不支援。如需有關跨多個描述檔之 API 支援的詳細資訊,請參閱 AIR 描述檔支援



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

相關 API 元素

    

timeSinceLastUserInput

屬性 
timeSinceLastUserInput:int  [唯讀]

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

上一次使用者輸入之後所經過的時間,以秒為單位。



實作
    public function get timeSinceLastUserInput():int

相關 API 元素

方法詳細資訊

    activate

()方法
public function activate(window:NativeWindow = null):void

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

啟動此應用程式。

在不支援 NativeWindow 類別的平台上,不支援此方法。

在作業系統判斷的某些情況下,這個方法並不會啟動應用程式。大多數的作業系統都會限制應用程式啟動自己的能力,以避免它在意外或惡意情況下讓使用者無法使用其他應用程式。

如果作業系統允許啟動,指定的視窗就會啟動,並移至桌面前景,也就是在其他應用程式視窗的前面。(如果 window 參數為 null,則會啟動這個應用程式的任何可見視窗)。

如果應用程式沒有任何可見視窗,activate() 方法就不會有任何效果。

啟動作業是同步的。

參數

window:NativeWindow (default = null) — 要與應用程式一起啟動之視窗的 NativeWindow 物件。


事件
activate:Event — 在啟動狀態變更時傳送。

    addEventListener

()方法 
override public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

執行階段版本: AIR 1.0

會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。您可以在顯示清單上的所有節點,為特定類型的事件、階段與優先順序註冊事件偵聽程式。

當您成功註冊事件偵聽程式後,就不可以透過對 addEventListener() 的額外呼叫來變更其優先順序。 若要變更偵聽程式的優先順序,您必須先呼叫 removeListener()。 然後,您就可以使用新的優先順序等級來重新註冊偵聽程式。

請記住,一旦您註冊了偵聽程式,對 addEventListener() 進行後續呼叫,若使用不同的 typeuseCapture 值,將會導致建立個別的偵聽程式註冊程序。 例如,如果您先將 useCapture 設為 true 來註冊偵聽程式,則只會在捕捉階段進行偵聽。 如果您使用相同的偵聽程式物件,再次呼叫 addEventListener() (但將 useCapture 設為 false) 會得到兩個不同的偵聽程式: 一個會在捕捉階段進行偵聽,另一個則會在目標與反昇階段進行偵聽。

您無法單獨針對目標階段或反昇階段註冊事件偵聽程式。 由於反昇階段只適用於目標節點的祖系,因此這兩種階段必須一起進行註冊。

如果您不再需要事件偵聽程式,可以呼叫 removeEventListener() 來移除它,否則可能產生記憶體問題。 事件偵聽程式不會自動從記憶體中移除,因為只要傳送的物件存在,垃圾回收器就不會移除偵聽程式 (除非 useWeakReference 參數設定為 true)。

複製 EventDispatcher 實體並不會將附加在該實體上的事件偵聽程式一併複製 (如果新建立的節點需要事件偵聽程式,則您必須在建立節點後再附加偵聽程式)。 然而,如果您移動了 EventDispatcher 實體,則附加的事件偵聽程式也會跟著移動。

若於此節點正在處理事件的同時將事件偵聽程式註冊到某個節點上,則事件偵聽程式不會在目前階段觸發,但會在事件流程的後續階段 (例如反昇階段) 中觸發。

如果您在節點正在處理事件的同時將事件偵聽程式從節點中移除,則事件偵聽程式還是會被目前的動作觸發。 一旦移除了事件偵聽程式,就無法再叫用它 (除非您為了日後的處理而再次註冊它)。

參數

type:String — 事件類型。
 
listener:Function — 處理事件的偵聽程式函數。此函數必須接受 Event 物件並當做唯一的參數,而且必須傳回空值,如下列範例所示:
function(evt:Event):void

函數可以具有任何名稱。

 
useCapture:Boolean (default = false)判斷偵聽程式是否可在捕捉階段或目標與反昇階段運作。如果 useCapture 設為 true,則偵聽程式只會在捕捉階段 (而不是在目標或反昇階段) 處理事件。如果 useCapturefalse,則偵聽程式只會在目標或反昇階段處理事件。若要在全部三個階段中偵聽事件,請呼叫 addEventListener 兩次,先將 useCapture 設為 true 進行第一次呼叫,再將 useCapture 設為 false 進行第二次呼叫。
 
priority:int (default = 0) — 事件偵聽程式的優先順序等級。優先順序是由一個具有正負號的 32 位元整數所指定。 數字越大,代表優先順序越高。所有優先順序為 n 的偵聽程式都會比優先順序為 n -1 的偵聽程式優先處理。 如果有兩個以上的偵聽程式共用同一個優先順序,則會依據加入的先後次序來處理。預設的優先順序為 0。
 
useWeakReference:Boolean (default = false) — 判斷偵聽程式的參照為強或弱。強參照 (預設) 會避免偵聽程式被垃圾回收器從記憶體中移除, 弱參照則無法避免這個情況發生。

類別層級的成員函數不受記憶體回收限制,因此您可以將類別層級成員函數的 useWeakReference 設定為 true,而且不會受到記憶體回收的限制。如果您將屬於巢狀內部函數的偵聽程式其 useWeakReference 設定為 true,該函數將會進行記憶體回收,而不再具備永續性。如果您建立內部函數的參考 (將它儲存在其他變數中),函數就不會進行記憶體回收,並保有永續性。

    clear

()方法 
public function clear():Boolean

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

在取得焦點的顯示物件上叫用內部刪除命令。

如果取得焦點的物件未實作此命令,則會忽略這個函數呼叫。目前只有 TextField 或 HTMLLoader 類別的後代顯示物件才會實作此命令。

注意:clear() 命令會刪除選取的文字。如果未選取任何內容,它不會清除所有文字。

傳回值
Booleantrue

    copy

()方法 
public function copy():Boolean

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

在取得焦點的顯示物件上叫用內部複製命令。

如果組件未實作此命令,則會忽略這個函數呼叫。目前只有 TextField 或 HTMLLoader 類別的後代顯示物件才會實作此命令。

傳回值
Boolean

    cut

()方法 
public function cut():Boolean

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

在取得焦點的顯示物件上叫用內部剪下命令。

如果組件未實作此命令,則會忽略這個函數呼叫。目前只有 TextField 或 HTMLLoader 類別的後代顯示物件才會實作此命令。

傳回值
Booleantrue

    dispatchEvent

()方法 
override public function dispatchEvent(event:Event):Boolean

執行階段版本: AIR 1.0

會將事件傳送到事件流程。事件目標就是呼叫 dispatchEvent() 方法時所需的 EventDispatcher 物件。

參數

event:Event — 傳送至事件流程中的 Event 物件。 如果重新傳送事件,會自動建立事件副本。 一旦傳送了事件,就無法變更其 target 屬性,因此您必須建立事件的新副本,重新傳送才能成功。

傳回值
Boolean — 如果成功傳送事件,則為 true 值。 false 值代表失敗,或是事件已經呼叫 preventDefault()

    exit

()方法 
public function exit(errorCode:int = 0):void

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

終止此應用程式。

exit() 方法的呼叫「將會」傳回。直到目前執行中的程式碼 (例如目前的事件處理常式) 都完成之後,關機序列才會開始。待處理的非同步作業都會取消,可能會或可能不會完成。

請注意,不會傳送 exiting 事件。如果應用程式邏輯需要 exiting 事件,請呼叫 NativeApplication.nativeApplication.dispatchEvent(),傳入 exiting 類型的 Event 物件。對於任何開啟的視窗,NativeWindow 物件會傳送 closingclose 事件。呼叫 closing 事件物件的 preventDefault() 會防止應用程式結束。

注意:在 iOS 作業系統上,不支援此方法。

參數

errorCode:int (default = 0) — 此應用程式結束時,報告作業系統的結束代碼。

    getDefaultApplication

()方法 
public function getDefaultApplication(extension:String):String

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

取得預設應用程式,以便開啟具有指定副檔名的檔案。

注意:此方法只能搭配應用程式描述器之 fileTypes 陳述式中宣告的檔案類型來使用。

此方法不適用於 AIR for TV 裝置。若以應用程式描述器中宣告的檔案類型來呼叫,將會傳回 null

參數

extension:String — 包含所需檔案類型副檔名的字串 (不含「.」)。

傳回值
String — 預設應用程式的路徑。

擲回值
Error — 如果 extension 參數不包含應用程式描述器內宣告的其中一個副檔名。

相關 API 元素

    isSetAsDefaultApplication

()方法 
public function isSetAsDefaultApplication(extension:String):Boolean

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

指定此應用程式目前是否為用於開啟具有指定副檔名之檔案的預設應用程式。

AIR 描述檔支援:所有桌上型電腦作業系統都支援此項功能,但行動裝置或 AIR for TV 裝置不支援。您可以使用 NativeApplication.supportsDefaultApplication 屬性測試執行階段的支援狀況。如需有關跨多個描述檔之 API 支援的詳細資訊,請參閱 AIR 描述檔支援

參數

extension:String — 包含所需檔案類型副檔名的字串 (不含「.」)。

傳回值
Boolean — 如果這個應用程式為預設值則為 true

擲回值
Error — 如果 extension 參數不包含應用程式描述器內宣告的其中一個副檔名。

相關 API 元素

    paste

()方法 
public function paste():Boolean

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

在取得焦點的顯示物件上叫用內部貼上命令。

如果組件未實作此命令,則會忽略這個函數呼叫。目前只有 TextField 或 HTMLLoader 類別的後代顯示物件才會實作此命令。

傳回值
Booleantrue

    removeAsDefaultApplication

()方法 
public function removeAsDefaultApplication(extension:String):void

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

移除此應用程式,使其不再成為開啟具有指定副檔名之檔案的預設應用程式。

注意:此方法只能搭配應用程式描述器之 fileTypes 陳述式中列出的檔案類型來使用。

參數

extension:String — 包含所需檔案類型副檔名的字串 (不含「.」)。


擲回值
Error — 如果 extension 參數不包含應用程式描述器內宣告的其中一個副檔名。

相關 API 元素

    removeEventListener

()方法 
override public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

執行階段版本: AIR 1.0

會從 EventDispatcher 物件移除偵聽程式。 如果沒有相符的偵聽程式以 EventDispatcher 物件來註冊,則呼叫此方法不會產生任何作用。

參數

type:String — 事件類型。
 
listener:Function — 要移除的偵聽程式物件。
 
useCapture:Boolean (default = false)指定偵聽程式是否針對捕捉階段或目標與反昇階段而註冊。如果偵聽程式同時針對捕捉階段和目標與反昇階段而註冊,則必須移除對 removeEventListener() 的兩次呼叫 (一次呼叫的 useCapture() 是設為 true,另一次呼叫的 useCapture() 則是設定為 false),才能移除這兩個階段。

    selectAll

()方法 
public function selectAll():Boolean

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

在取得焦點的顯示物件上叫用內部全選命令。

如果組件未實作此命令,則會忽略這個函數呼叫。目前只有 TextField 或 HTMLLoader 類別的後代顯示物件才會實作此命令。

傳回值
Booleantrue

    setAsDefaultApplication

()方法 
public function setAsDefaultApplication(extension:String):void

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

將此應用程式設定為用於開啟具有指定副檔名之檔案的預設應用程式。

注意:此方法只能搭配應用程式描述器之 fileTypes 陳述式中宣告的檔案類型來使用。

參數

extension:String — 包含所需檔案類型副檔名的字串 (不含「.」)。


擲回值
Error — 如果 extension 參數不包含應用程式描述器內宣告的其中一個副檔名。

相關 API 元素

事件詳細資訊
    

activate

事件
事件物件類型: flash.events.Event
屬性 Event.type = flash.events.Event.ACTIVATE

執行階段版本: AIR 1.0

在此應用程式成為作用中的桌面應用程式時傳送。

ACTIVATE 常數會定義 activate 事件物件的 type 屬性值。

注意:這個事件沒有「捕捉階段」也沒有「反昇階段」,這表示事件偵聽程式必須直接加入至任何可能的目標,不論目標是否在顯示清單上。

AIR for TV 裝置永遠不會自動傳送此事件。但是,您可以手動傳送。

這個事件具有下列屬性:

屬性
bubblesfalse
cancelablefalse;沒有要取消的預設行為指令。
currentTarget正主動使用事件偵聽程式處理 Event 物件的物件。
target具有為 activate 事件註冊之偵聽程式的任何 DisplayObject 實體。
    

browserInvoke

事件  
事件物件類型: flash.events.BrowserInvokeEvent
屬性 BrowserInvokeEvent.type = flash.events.BrowserInvokeEvent.Browser_INVOKE

執行階段版本: AIR 1.0

在使用者瀏覽器中執行的 SWF 檔案叫用應用程式時傳送。

只有當應用程式在應用程式描述器檔案中指定下列項目時,才允許使用瀏覽器叫用功能:

<allowBrowserInvocation>true</allowBrowserInvocation>

    

deactivate

事件  
事件物件類型: flash.events.Event
屬性 Event.type = flash.events.Event.DEACTIVATE

執行階段版本: AIR 1.0

在桌面焦點切換至不同的應用程式時傳送。

Event.DEACTIVATE 常數會定義 deactivate 事件物件的 type 屬性值。

注意:這個事件沒有「捕捉階段」也沒有「反昇階段」,這表示事件偵聽程式必須直接加入至任何可能的目標,不論目標是否在顯示清單上。

AIR for TV 裝置永遠不會自動傳送此事件。但是,您可以手動傳送。

這個事件具有下列屬性:

屬性
bubblesfalse
cancelablefalse;沒有要取消的預設行為指令。
currentTarget正主動使用事件偵聽程式處理 Event 物件的物件。
target具有為 deactivate 事件註冊之偵聽程式的任何 DisplayObject 實體。
    

exiting

事件  
事件物件類型: flash.events.Event
屬性 Event.type = flash.events.Event.EXITING

執行階段版本: AIR 1.0

當啟動應用程式結束序列時傳送。

當應用程式結束動作是由作業系統所起始時,就會傳送 exiting 事件,例如,當使用者在 Mac OS X 上發出 Cmd-Q 按鍵組合時,或是當 NativeApplication 物件的 autoExit 屬性為 true,且關閉最後一個應用程式視窗時。取消這個事件可避免應用程式結束。

AIR for TV 裝置永遠不會傳送 exiting 事件。

注意:呼叫 NativeApplication 的 exit() 方法並不會造成 exiting 事件的傳送。若要警告組件即將結束,請在呼叫 exit() 之前傳送 exiting 事件。

Event.EXITING 常數會定義 exiting 事件物件的 type 屬性值。

這個事件具有下列屬性:

屬性
bubblesfalse
cancelabletrue;取消此事件物件將停止結束作業。
currentTargetNativeApplication 物件。
targetNativeApplication 物件。
    

invoke

事件  
事件物件類型: flash.events.InvokeEvent
屬性 InvokeEvent.type = flash.events.InvokeEvent.INVOKE

執行階段版本: AIR 1.0

在叫用應用程式時傳送。

第二次叫用應用程式時,並不會啟動應用程式的另一個實體。相反地,第一個實體會接收到額外的 invoke 事件。該應用程式必須負責適當地處理後續的 invoke 事件。

注意:所有的 invoke 事件都會排入佇列中。當註冊這個事件的偵聽程式時,它會在佇列中收到所有事件以及任何新的事件。佇列中的事件可能會在任何新的 invoke 事件加入之前或之後傳送。

InvokeEvent.INVOKE 常數會定義 InvokeEvent 物件的 type 屬性值。

InvokeEvent 物件具有下列屬性:

屬性
引數在此叫用期間傳遞的字串引數陣列。
currentDirectory代表應該用來解析 arguments 陣列中任何相對路徑的目錄之 File 物件。
reason指出 invoke 事件因為應用程式在登入時自動啟動 (InvokeEventReason.LOGIN)、啟動做為遠端通知的回應 (InvokeEventReason.NOTIFICATION - 僅限 iOS)、其他應用程式叫用應用程式 (InvokeEventReason.OPEN_URL),或是另一個原因 (InvokeEventReason.STANDARD) 而傳送的代碼。AIR 1.5.1 版以上可使用。
bubblesfalse
cancelablefalse;沒有要取消的預設行為指令。
currentTarget表示以事件偵聽程式主動處理此 InvokeEvent 物件的物件。
target永遠是 NativeApplication 物件。
    

keyDown

事件  
事件物件類型: flash.events.KeyboardEvent
屬性 KeyboardEvent.type = flash.events.KeyboardEvent.KEY_DOWN

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

會當使用者按下按鍵時傳送。 NativeApplication 實體會提供這個事件以支援鍵盤快速鍵。這個鍵盤事件會先傳送至 NativeApplication。取消此事件也會取消 NativeWindow 選單快速鍵。此事件會在 keyUp 事件之前發生。

KeyboardEvent.KEY_DOWN 常數會定義 keyDown 事件物件的 type 屬性值。

這個事件具有下列屬性:

屬性
bubblestrue
cancelable在 AIR 中為 true,在 Flash Player 中為 false;在 AIR 中,取消這個事件可以阻止字元被輸入到文字欄位。
charCode按下或放開之按鍵的字元碼值。
commandKey在 Mac 中,如果 Command 鍵為作用中,則為 true;否則為 false
controlKey在 Windows 和 Linux 中,如果 Ctrl 鍵為作用中,則為 true;在 Mac 中,如果 Control 鍵為作用中,則為 true;否則為 false
ctrlKey在 Windows 和 Linux 中,如果 Ctrl 鍵為作用中,則為 true;在 Mac 中,如果 Ctrl 鍵或 Command 鍵為作用中,則為 true;否則為 false
currentTarget正主動使用事件偵聽程式處理 Event 物件的物件。
keyCode按下或放開之按鍵的按鍵碼值。
keyLocation鍵盤上的按鍵位置。
shiftKey如果 Shift 鍵為作用中,則為 true;若已停用,則為 false
target成為焦點的 InteractiveObject 實體。 target 不會永遠都是顯示清單中註冊事件偵聽程式的物件。 請使用 currentTarget 屬性,存取目前正在處理該事件之顯示清單中的物件。

相關 API 元素

    

keyUp

事件  
事件物件類型: flash.events.KeyboardEvent
屬性 KeyboardEvent.type = flash.events.KeyboardEvent.KEY_UP

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

會當使用者放開按鍵時傳送。 NativeApplication 實體會提供這個事件以支援鍵盤快速鍵。這個鍵盤事件會先傳送至 NativeApplication。取消此事件不會影響其他物件 (例如 NativeWindow 選單快速鍵)。這個事件會在 keyDown 事件之後發生。

KeyboardEvent.KEY_UP 常數會定義 keyUp 事件物件的 type 屬性值。

這個事件具有下列屬性:

屬性
bubblestrue
cancelablefalse;沒有要取消的預設行為指令。
charCode包含按下或放開之按鍵的字元碼值。
commandKey在 Mac 中,如果 Command 鍵為作用中,則為 true;否則為 false
controlKey在 Windows 和 Linux 中,如果 Ctrl 鍵為作用中,則為 true;在 Mac 中,如果 Control 鍵為作用中,則為 true;否則為 false
ctrlKey在 Windows 中,如果 Ctrl 鍵為作用中,則為 true;在 Mac 中,如果 Ctrl 鍵或 Command 鍵為作用中,則為 true;否則為 false
currentTarget正主動使用事件偵聽程式處理 Event 物件的物件。
keyCode按下或放開之按鍵的按鍵碼值。
keyLocation鍵盤上的按鍵位置。
shiftKey如果 Shift 鍵為作用中,則為 true;若已停用,則為 false
target成為焦點的 InteractiveObject 實體。 target 不會永遠都是顯示清單中註冊事件偵聽程式的物件。 請使用 currentTarget 屬性,存取目前正在處理該事件之顯示清單中的物件。

相關 API 元素

    

networkChange

事件  
事件物件類型: flash.events.Event
屬性 Event.type = flash.events.Event.NETWORK_CHANGE

執行階段版本: AIR 1.0

在新的網路連線可用之後或是現有的網路連線遺失時傳送。

networkChange 事件不一定表示主機電腦已連線或離線,因為它可能只是從某種連線類型轉換成另一種而已。應用程式可以使用此事件,協助將監視遠端資源可用性的工作最佳化。傳送 networkChange 事件時,通常就是確認是否有遠端資源可使用的好時機。

注意:

  • 網路變更和傳送此事件之間,可能會有短暫的延遲。
  • 在 Android 上,網路連線每次變更時,NativeApplication 物件可能會傳送超過一個以上的 networkChange 事件。

Event.NETWORK_CHANGE 常數會定義 networkChange 事件物件的 type 屬性值。

這個事件具有下列屬性:

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

suspend

事件  
事件物件類型: flash.events.Event
屬性 Event.type = flash.events.Event.SUSPEND

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

當作業系統即將暫停應用程式時傳送。

Event.SUSPEND 常數會定義 suspend 事件物件的 type 屬性值。這個事件只在 AIR iOS 上傳送。

這個事件具有下列屬性:

屬性
bubblesfalse
cancelablefalse;沒有要取消的預設行為指令。
currentTargetNativeApplication 物件。
targetNativeApplication 物件。
    

userIdle

事件  
事件物件類型: flash.events.Event
屬性 Event.type = flash.events.Event.USER_IDLE

執行階段版本: AIR 1.0

當使用者閒置時傳送。

指定使用 idleThreshold 屬性傳送此事件之前,使用者必須閒置的期間。使用者已閒置時間量可透過 timeSinceLastUserInput 屬性來判斷。

注意:行動裝置或 AIR for TV 裝置不會傳送此事件。

Event.USER_IDLE 常數會定義 userIdle 事件物件的 type 屬性值。

這個事件具有下列屬性:

屬性
bubblesfalse
cancelablefalse;沒有要取消的預設行為指令。
targetNativeApplication 物件。

相關 API 元素

    

userPresent

事件  
事件物件類型: flash.events.Event
屬性 Event.type = flash.events.Event.USER_PRESENT

執行階段版本: AIR 1.0

當作業系統在閒置一段時間之後偵測到滑鼠或鍵盤活動時傳送。

注意:行動裝置或 AIR for TV 裝置不會傳送此事件。

視為閒置的時期可使用 idleThreshold 屬性來設定。使用者已閒置時間量可透過 timeSinceLastUserInput 屬性來判斷。

Event.USER_PRESENT 常數會定義 userPresent 事件物件的 type 屬性值。

這個事件具有下列屬性:

屬性
bubblesfalse
cancelablefalse;沒有要取消的預設行為指令。
targetNativeApplication 物件。

相關 API 元素





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

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