用于 Adobe® Flash® Platform 的 ActionScript® 3.0 参考
主页  |  隐藏包列表和类列表 |   |   |  新增内容  |  索引  |  附录  |  为什么显示为英语?
过滤条件: AIR 30.0 和更早版本, Flash Player 30.0 和更早版本, Flash Lite 4
Flex 4.6 和更早版本, Flash Pro CS6 和更早版本
隐藏过滤条件
flash.system 

Capabilities  - 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 的标签
Motion XML 元素
Timed Text 标记
不推荐使用的元素的列表
AccessibilityImplementation 常量
如何使用 ActionScript 示例
法律声明
flash.system
public final class Capabilities
继承Capabilities Inheritance Object

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

Capabilities 类提供一些属性,这些属性描述了承载应用程序的系统和运行时。例如,手机屏幕可能有 100 个正方形像素(黑白),而 PC 屏幕可能有 1000 个正方形像素(彩色)。通过使用 Capabilities 类确定客户端具有的功能,您可以向尽可能多的用户提供适当的内容。如果熟悉设备的功能,则可以通知服务器发送合适的 SWF 文件,或是通知 SWF 文件变更其播放方式。

但 Adobe AIR 的有些功能没有作为 Capabilities 类的属性列出。这些功能是其他类的属性:

属性说明
NativeApplication.supportsDockIcon 操作系统是否支持应用程序文档图标。
NativeApplication.supportsMenu 操作系统是否支持全局应用程序菜单栏。
NativeApplication.supportsSystemTrayIcon 操作系统是否支持系统任务栏图标。
NativeWindow.supportsMenu 操作系统是否支持窗口菜单。
NativeWindow.supportsTransparency 操作系统是否支持透明窗口。

请勿 使用 Capabilities.osCapabilities.manufacturer 来根据操作系统确定功能。以操作系统来决定功能是个不良习惯,因为如果应用程序没有考虑到所有潜在的目标操作系统,这会产生问题。建议使用与要测试的功能相对应的属性。

可使用 GETPOST HTTP 方法发送功能信息,这些信息作为一个 URL 编码的字符串存储在 Capabilities.serverString 属性中。下例显示了支持 MP3、具有 1600 x 1200 像素分辨率、运行 Windows XP、安装有输入法编辑器 (IME) 但没有提供多信道音频支持的计算机的服务器字符串:

A=t&SA=t&SV=t&EV=t&MP3=t&AE=t&VE=t&ACC=f&PR=t&SP=t&
     SB=f&DEB=t&V=WIN%209%2C0%2C0%2C0&M=Adobe%20Windows&
     R=1600x1200&DP=72&COL=color&AR=1.0&OS=Windows%20XP&
     L=en&PT=External&AVD=f&LFD=f&WD=f&IME=t&DD=f&
     DDP=f&DTS=f&DTE=f&DTH=f&DTM=f

下表列出了 Capabilities 类的属性和相应的服务器字符串。它还列出了多信道音频类型的服务器字符串。

Capabilities 类属性服务器字符串
avHardwareDisable AVD
hasAccessibility ACC
hasAudio A
hasAudioEncoder AE
hasEmbeddedVideo EV
hasIME IME
hasMP3 MP3
hasPrinting PR
hasScreenBroadcast SB
hasScreenPlayback SP
hasStreamingAudio SA
hasStreamingVideo SV
hasTLS TLS
hasVideoEncoder VE
isDebugger DEB
language L
localFileReadDisable LFD
manufacturer M
maxLevelIDC ML
os OS
pixelAspectRatio AR
playerType PT
screenColor COL
screenDPI DP
screenResolutionX R
screenResolutionY R
version V
supports Dolby Digital audio DD
supports Dolby Digital Plus audio DDP
supports DTS audio DTS
supports DTS Express audio DTE
supports DTS-HD High Resolution Audio DTH
supports DTS-HD Master Audio DTM

还有一个 WD 服务器字符串,用于指定是否禁用无窗口模式。如果与 Web 浏览器不兼容或用户在 mms.cfg 文件中进行了相应设置,则可以在 Flash Player 中禁用无窗口模式。没有对应的 Capabilities 属性。

Capabilities 类的所有属性都是只读的。

查看示例



公共属性
 属性由以下参数定义
  avHardwareDisable : Boolean
[静态] [只读] 指定对用户的摄像头和麦克风的访问是已经通过管理方式禁止 (true) 还是允许 (false)。
Capabilities
 Inheritedconstructor : Object
对类对象或给定对象实例的构造函数的引用。
Object
  cpuArchitecture : String
[静态] [只读] 指定当前 CPU 体系结构。
Capabilities
  hasAccessibility : Boolean
[静态] [只读] 指定系统是否支持与辅助功能通信,如果是,则为 true,否则为 false。
Capabilities
  hasAudio : Boolean
[静态] [只读] 指定系统是否有音频功能。
Capabilities
  hasAudioEncoder : Boolean
[静态] [只读] 指定系统是否可以对音频流(如来自麦克风的音频流)进行编码,如果是,则为 true,否则为 false。
Capabilities
  hasEmbeddedVideo : Boolean
[静态] [只读] 指定系统是否支持嵌入的视频,如果是,则为 true,否则为 false。
Capabilities
  hasIME : Boolean
[静态] [只读] 指定系统是否安装了输入法编辑器 (IME),如果是,则为 true,否则为 false。
Capabilities
  hasMP3 : Boolean
[静态] [只读] 指定系统是否具有 MP3 解码器,如果是,则为 true,否则为 false。
Capabilities
  hasPrinting : Boolean
[静态] [只读] 指定系统是否支持打印,如果是,则为 true,否则为 false。
Capabilities
  hasScreenBroadcast : Boolean
[静态] [只读] 指定系统是否支持开发通过 Flash Media Server 运行的屏幕广播应用程序,如果是,则为 true,否则为 false。
Capabilities
  hasScreenPlayback : Boolean
[静态] [只读] 指定系统是否支持播放通过 Flash Media Server 运行的屏幕广播应用程序,如果是,则为 true,否则为 false。
Capabilities
  hasStreamingAudio : Boolean
[静态] [只读] 指定系统是否可以播放音频流,如果是,则为 true,否则为 false。
Capabilities
  hasStreamingVideo : Boolean
[静态] [只读] 指定系统是否可以播放视频流,如果是,则为 true,否则为 false。
Capabilities
  hasTLS : Boolean
[静态] [只读] 指定系统是否通过 NetConnection 支持本机 SSL 套接字,如果是,则为 true,否则为 false。
Capabilities
  hasVideoEncoder : Boolean
[静态] [只读] 指定系统是否可以对视频流(如来自 Web 摄像头的视频流)进行编码,如果是,则为 true,否则为 false。
Capabilities
  isDebugger : Boolean
[静态] [只读] 指定系统是特殊的调试版本 (true),还是正式发布的版本 (false)。
Capabilities
  isEmbeddedInAcrobat : Boolean
[静态] [只读] 指定 Flash 运行时是否嵌入用 Acrobat 9.0 或更高版本打开的 PDF 文件中,如果是,则为 true,否则为 false。
Capabilities
  language : String
[静态] [只读] 指定运行内容的系统的语言代码。
Capabilities
      languages : Array
[静态] [只读] 包含用户的首选用户界面语言相关信息的字符串数组,通过操作系统设置。
Capabilities
  localFileReadDisable : Boolean
[静态] [只读] 指定对用户硬盘的读取权限是已经通过管理方式禁止 (true) 还是允许 (false)。
Capabilities
  manufacturer : String
[静态] [只读] 指定 Flash Player 的运行版本或 AIR 运行时的制造商,其格式为“Adobe OSName”。
Capabilities
  maxLevelIDC : String
[静态] [只读] 检索客户端硬件支持的最高 H.264 级 IDC。
Capabilities
  os : String
[静态] [只读] 指定当前的操作系统。
Capabilities
  pixelAspectRatio : Number
[静态] [只读] 指定屏幕的像素高宽比。
Capabilities
  playerType : String
[静态] [只读] 指定运行时环境的类型。
Capabilities
  screenColor : String
[静态] [只读] 指定屏幕的颜色。
Capabilities
  screenDPI : Number
[静态] [只读] 指定屏幕的每英寸点数 (dpi) 分辨率,以像素为单位。
Capabilities
  screenResolutionX : Number
[静态] [只读] 指定屏幕的最大水平分辨率。
Capabilities
  screenResolutionY : Number
[静态] [只读] 指定屏幕的最大垂直分辨率。
Capabilities
  serverString : String
[静态] [只读] URL 编码的字符串,用于指定每个 Capabilities 属性的值。
Capabilities
  supports32BitProcesses : Boolean
[静态] [只读] 指定系统是否支持运行 32 位的进程。
Capabilities
  supports64BitProcesses : Boolean
[静态] [只读] 指定系统是否支持运行 64 位的进程。
Capabilities
  touchscreenType : String
[静态] [只读] 指定支持的触摸屏的类型(如果有)。
Capabilities
  version : String
[静态] [只读] 指定 Flash Player 或 Adobe® AIR® 平台和版本信息。
Capabilities
公共方法
 方法由以下参数定义
  
[静态] 指定系统是否支持特定类型的多信道音频。
Capabilities
 Inherited
表示对象是否已经定义了指定的属性。
Object
 Inherited
表示 Object 类的实例是否在指定为参数的对象的原型链中。
Object
 Inherited
表示指定的属性是否存在、是否可枚举。
Object
 Inherited
设置循环操作动态属性的可用性。
Object
 Inherited
返回此对象的字符串表示形式,其格式设置遵守区域设置特定的约定。
Object
 Inherited
返回指定对象的字符串表示形式。
Object
 Inherited
返回指定对象的原始值。
Object
属性详细信息

avHardwareDisable

属性
avHardwareDisable:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定对用户的摄像头和麦克风的访问是已经通过管理方式禁止 (true) 还是允许 (false)。服务器字符串为 AVD

对于 Adobe AIR™ 中的内容,此属性仅适用于应用程序安全沙箱以外的安全沙箱中的内容。应用程序安全沙箱中的内容始终可以访问用户的摄像头和麦克风。



实现
    public static function get avHardwareDisable():Boolean

相关 API 元素

cpuArchitecture

属性 
cpuArchitecture:String  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 10.0.32, AIR 1.5.1

指定当前 CPU 体系结构。cpuArchitecture 属性可以返回以下字符串:“PowerPC”、“x86”、“SPARC”和“ARM”。服务器字符串为 ARCH



实现
    public static function get cpuArchitecture():String

hasAccessibility

属性 
hasAccessibility:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定系统是否支持与辅助功能通信,如果是,则为 true,否则为 false。服务器字符串为 ACC



实现
    public static function get hasAccessibility():Boolean

相关 API 元素

hasAudio

属性 
hasAudio:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定系统是否有音频功能。此属性始终为 true。服务器字符串为 A



实现
    public static function get hasAudio():Boolean

hasAudioEncoder

属性 
hasAudioEncoder:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定系统是否可以对音频流(如来自麦克风的音频流)进行编码,如果是,则为 true,否则为 false。服务器字符串为 AE



实现
    public static function get hasAudioEncoder():Boolean

hasEmbeddedVideo

属性 
hasEmbeddedVideo:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定系统是否支持嵌入的视频,如果是,则为 true,否则为 false。服务器字符串为 EV



实现
    public static function get hasEmbeddedVideo():Boolean

hasIME

属性 
hasIME:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定系统是否安装了输入法编辑器 (IME),如果是,则为 true,否则为 false。服务器字符串为 IME



实现
    public static function get hasIME():Boolean

相关 API 元素

hasMP3

属性 
hasMP3:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定系统是否具有 MP3 解码器,如果是,则为 true,否则为 false。服务器字符串为 MP3



实现
    public static function get hasMP3():Boolean

hasPrinting

属性 
hasPrinting:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定系统是否支持打印,如果是,则为 true,否则为 false。服务器字符串为 PR



实现
    public static function get hasPrinting():Boolean

hasScreenBroadcast

属性 
hasScreenBroadcast:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定系统是否支持开发通过 Flash Media Server 运行的屏幕广播应用程序,如果是,则为 true,否则为 false。服务器字符串为 SB



实现
    public static function get hasScreenBroadcast():Boolean

hasScreenPlayback

属性 
hasScreenPlayback:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定系统是否支持播放通过 Flash Media Server 运行的屏幕广播应用程序,如果是,则为 true,否则为 false。服务器字符串为 SP



实现
    public static function get hasScreenPlayback():Boolean

hasStreamingAudio

属性 
hasStreamingAudio:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定系统是否可以播放音频流,如果是,则为 true,否则为 false。服务器字符串为 SA



实现
    public static function get hasStreamingAudio():Boolean

hasStreamingVideo

属性 
hasStreamingVideo:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定系统是否可以播放视频流,如果是,则为 true,否则为 false。服务器字符串为 SV



实现
    public static function get hasStreamingVideo():Boolean

hasTLS

属性 
hasTLS:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定系统是否通过 NetConnection 支持本机 SSL 套接字,如果是,则为 true,否则为 false。服务器字符串为 TLS



实现
    public static function get hasTLS():Boolean

相关 API 元素

hasVideoEncoder

属性 
hasVideoEncoder:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定系统是否可以对视频流(如来自 Web 摄像头的视频流)进行编码,如果是,则为 true,否则为 false。服务器字符串为 VE



实现
    public static function get hasVideoEncoder():Boolean

isDebugger

属性 
isDebugger:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定系统是特殊的调试版本 (true),还是正式发布的版本 (false)。服务器字符串为 DEB。在 Flash Player 调试版或 AIR Debug Launcher (ADL) 中运行时,此属性设置为 true



实现
    public static function get isDebugger():Boolean

isEmbeddedInAcrobat

属性 
isEmbeddedInAcrobat:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9.0.127.0, AIR 1.1, Flash Lite 4

指定 Flash 运行时是否嵌入用 Acrobat 9.0 或更高版本打开的 PDF 文件中,如果是,则为 true,否则为 false



实现
    public static function get isEmbeddedInAcrobat():Boolean

language

属性 
language:String  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定运行内容的系统的语言代码。语言指定为 ISO 639-1 中的小写双字母语言代码。对于中文,另外使用 ISO 3166 中的大写双字母国家/地区代码,以区分简体中文和繁体中文。语言代码基于语言的英文名称:例如,hu 指定匈牙利语。

在英文系统上,此属性仅返回语言代码 (en),而不返回国家/地区代码。在 Microsoft Windows 系统上,此属性返回用户界面 (UI) 语言,该语言指的是所有菜单、对话框、错误信息和帮助文件所使用的语言。下表列出了可能的值:

语言
捷克语cs
丹麦语da
荷兰语nl
英语en
芬兰语fi
法语fr
德语de
匈牙利语hu
意大利语it
日语ja
韩语ko
挪威语nb
其他/未知xu
波兰语pl
葡萄牙语pt
俄语ru
简体中文zh-CN
西班牙语es
瑞典语sv
繁体中文zh-TW
土耳其语tr

注意:Capabilities.language 属性的值限制为此列表上可能的值。由于此限制,Adobe AIR 应用程序应使用 Capabilities.languages 数组中的第一个元素决定系统的主用户界面语言。

服务器字符串为 L



实现
    public static function get language():String

相关 API 元素


示例  ( 如何使用本示例 )
在下面的示例中,根据用户操作系统的语言显示内容。

Capabilities.language 属性返回 ISO 639-1 语言代码(例如,“en”表示英语)。switch 语句检查语言代码,并将 myTextField 文本字段的内容设置为特定于该语言的问候语。如果示例不支持该语言代码,则返回默认的错误字符串。

package {
    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.system.Capabilities;

    public class Capabilities_languageExample extends Sprite {

        public function Capabilities_languageExample()  {
            var myTextField:TextField = new TextField();         
            myTextField.x = 10;
            myTextField.y = 10;
            myTextField.background = true;
            myTextField.autoSize = TextFieldAutoSize.LEFT;
            
            var greetingEnglish:String = "Hello World";
            var greetingGerman:String = "Hallo Welt";
            var greetingFrench:String = "Bonjour Monde";
            var greetingSpanish:String = "Hola Mundo";

            var lang:String = Capabilities.language;
                         
            switch (lang) {
                case "en":
                    myTextField.text = greetingEnglish;
                    break;
                case "de":
                    myTextField.text = greetingGerman;
                    break;
                case "fr":
                    myTextField.text = greetingFrench;
                    break;
                case "es":
                    myTextField.text = greetingSpanish;
                    break;
                default:
                    myTextField.text = "Sorry your system's language is not supported at this time.";               
            }
             
            this.addChild(myTextField);
        }
    }
}
    

languages

属性 
languages:Array  [只读]

语言版本: ActionScript 3.0
运行时版本: AIR 1.1

包含用户的首选用户界面语言相关信息的字符串数组,通过操作系统设置。字符串将包含由 RFC4646 (http://www.ietf.org/rfc/rfc4646.txt) 定义的语言标签(如果适用,还包含字型和区域信息),并使用短划线作为分隔符(例如“en-US”“ja-JP”)。数组中的各语言按照由操作系统设置决定的优先顺序列出。

各种操作系统在区域设置字符串中返回的区域信息有所不同。一个操作系统可能返回“en-us”,而另一个操作系统可能返回“en”

返回数组中的第一个条目的主语言 ID 通常与 Capabilities.language 属性相同。例如,如果 Capabilities.languages[0] 设为“en-US”,则 language 属性将设为“en”。不过,如果 Capabilities.language 属性设为“xu”(指定一个未知语言),则此数组中的第一个元素将与之不同。因此,Capabilities.languages[0] 可能比 Capabilities.language 更准确。

服务器字符串为 LS



实现
    public static function get languages():Array

localFileReadDisable

属性 
localFileReadDisable:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定对用户硬盘的读取权限是已经通过管理方式禁止 (true) 还是允许 (false)。对于 Adobe AIR 中的内容,此属性仅适用于应用程序安全沙箱以外的安全沙箱中的内容。(应用程序安全沙箱中的内容始终可以从文件系统进行读取。)如果此属性设置为 true,则 Flash Player 将无法从用户的硬盘读取文件(包括随同 Flash Player 一同启动的第一个文件)。如果此属性设置为 true,则应用程序安全沙箱以外的 AIR 内容将无法从用户的硬盘读取文件。例如,如果此属性设置为 true,则读取用户硬盘文件的尝试将会失败。

如果此属性设置为 true,则读取运行时共享库也会被阻止,但不管该属性值为何值,都允许读取本地共享的对象。

服务器字符串为 LFD



实现
    public static function get localFileReadDisable():Boolean

相关 API 元素

manufacturer

属性 
manufacturer:String  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定 Flash Player 的运行版本或 AIR 运行时的制造商,其格式为“Adobe OSNameOSName 的值可以是“Windows”“Macintosh”“Linux”或其他操作系统名称。服务器字符串为 M

如果存在更具体的功能属性,请勿 使用 Capabilities.manufacturer 来根据操作系统确定功能。以操作系统来决定功能是个不良习惯,因为如果应用程序没有考虑到所有潜在的目标操作系统,这会产生问题。建议使用与要测试的功能相对应的属性。有关详细信息,请参阅 Capabilities 类的描述。



实现
    public static function get manufacturer():String

maxLevelIDC

属性 
maxLevelIDC:String  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 10, AIR 1.5, Flash Lite 4

检索客户端硬件支持的最高 H.264 级 IDC。以此级别运行的媒体不能保证运行;但是,以最高级别运行的媒体可能无法以最高品质运行。此属性对于尝试以客户端的功能为目标的服务器非常有用。使用此属性,服务器可以确定要发送给客户端的视频的级别。

服务器字符串为 ML



实现
    public static function get maxLevelIDC():String

os

属性 
os:String  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定当前的操作系统。os 属性可以返回下列字符串:

操作系统
Windows 10“Windows 10”
Windows 8“Windows 8”
Windows 7"Windows 7"
Windows Vista"Windows Vista"
Windows Server 2012“Windows Server 2012”
Windows Server 2008 R2"Windows Server 2008 R2"
Windows Server 2008"Windows Server 2008"
Windows Home Server"Windows Home Server"
Windows Server 2003 R2"Windows Server 2003 R2"
Windows Server 2003"Windows Server 2003"
Windows XP 64"Windows Server XP 64"
Windows XP"Windows XP"
Windows 98"Windows 98"
Windows 95"Windows 95"
Windows NT"Windows NT"
Windows 2000"Windows 2000"
Windows ME"Windows ME"
Windows CE"Windows CE"
Windows SmartPhone"Windows SmartPhone"
Windows PocketPC"Windows PocketPC"
Windows CEPC"Windows CEPC"
Windows Mobile"Windows Mobile"
Mac OS"Mac OS X.Y.Z"(其中 X.Y.Z 为版本号,例如 "Mac OS 10.5.2"
Linux"Linux"(Flash Player 连接 Linux 版本,如 "Linux 2.6.15-1.2054_FC5smp"
iPhone OS 4.1"iPhone3,1"

服务器字符串为 OS

如果存在更具体的功能属性,请勿 使用 Capabilities.os 来根据操作系统确定功能。以操作系统来决定功能是个不良习惯,因为如果应用程序没有考虑到所有潜在的目标操作系统,这会产生问题。建议使用与要测试的功能相对应的属性。有关详细信息,请参阅 Capabilities 类的描述。



实现
    public static function get os():String

pixelAspectRatio

属性 
pixelAspectRatio:Number  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定屏幕的像素高宽比。服务器字符串为 AR



实现
    public static function get pixelAspectRatio():Number

playerType

属性 
playerType:String  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定运行时环境的类型。此属性可以是下列值之一:

  • "ActiveX",用于 Microsoft Internet Explorer 使用的 Flash Player ActiveX 控件
  • “Desktop”代表 Adobe AIR 运行时(通过 HTML 页加载的 SWF 内容除外,该内容将 Capabilities.playerType 设置为“PlugIn”
  • External”,用于外部 Flash Player 或处于测试模式下
  • “PlugIn”代表 Flash Player 浏览器插件(和通过 AIR 应用程序中的 HTML 页加载的 SWF 内容)
  • "StandAlone",用于独立的 Flash Player

服务器字符串为 PT



实现
    public static function get playerType():String

screenColor

属性 
screenColor:String  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定屏幕的颜色。此属性的值可以是“color”“gray”(代表灰度),或是“bw”(代表黑白)。服务器字符串为 COL



实现
    public static function get screenColor():String

screenDPI

属性 
screenDPI:Number  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定屏幕的每英寸点数 (dpi) 分辨率,以像素为单位。服务器字符串为 DP



实现
    public static function get screenDPI():Number

screenResolutionX

属性 
screenResolutionX:Number  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定屏幕的最大水平分辨率。服务器字符串为 R(它返回屏幕的宽度和高度)。此属性不会随用户的屏幕分辨率而更新,而仅指示 Flash Player 或 Adobe AIR 应用程序启动时的分辨率。另外,此值只指定主屏幕。



实现
    public static function get screenResolutionX():Number

screenResolutionY

属性 
screenResolutionY:Number  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定屏幕的最大垂直分辨率。服务器字符串为 R(它返回屏幕的宽度和高度)。此属性不会随用户的屏幕分辨率而更新,而仅指示 Flash Player 或 Adobe AIR 应用程序启动时的分辨率。另外,此值只指定主屏幕。



实现
    public static function get screenResolutionY():Number

示例  ( 如何使用本示例 )
以下示例是一个简单测试,用于指示当前屏幕分辨率和操作系统版本。测试该示例时,单击文本字段可查看属性值:
import flash.events.*;
import flash.display.*;
import flash.system.Capabilities;
import flash.text.TextField;

var screenInfoTxt:TextField = new TextField();
screenInfoTxt.x = 30;
screenInfoTxt.y = 50;
screenInfoTxt.width = 300;
screenInfoTxt.height = 100;
screenInfoTxt.border = true;

addChild(screenInfoTxt);

addEventListener(MouseEvent.CLICK, getScreenNVersion);

function getScreenNVersion(e:MouseEvent):void{
    screenInfoTxt.text= "flash.system.Capabilities.screenResolutionX is : " + String(flash.system.Capabilities.screenResolutionX) + "\n" +
    "flash.system.Capabilities.screenResolutionY is : " + String(flash.system.Capabilities.screenResolutionY) + "\n" +
    "flash.system.Capabilities.version is : " + flash.system.Capabilities.version;
}

serverString

属性 
serverString:String  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

URL 编码的字符串,用于指定每个 Capabilities 属性的值。

以下示例显示了一个 URL 编码的字符串:

A=t&SA=t&SV=t&EV=t&MP3=t&AE=t&VE=t&ACC=f&PR=t&SP=t&
	 SB=f&DEB=t&V=WIN%208%2C5%2C0%2C208&M=Adobe%20Windows&
	 R=1600x1200&DP=72&COL=color&AR=1.0&OS=Windows%20XP&
	 L=en&PT=External&AVD=f&LFD=f&WD=f



实现
    public static function get serverString():String

supports32BitProcesses

属性 
supports32BitProcesses:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 10.0.32, AIR 1.5.2

指定系统是否支持运行 32 位的进程。服务器字符串为 PR32



实现
    public static function get supports32BitProcesses():Boolean

supports64BitProcesses

属性 
supports64BitProcesses:Boolean  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 10.0.32, AIR 1.5.2

指定系统是否支持运行 64 位的进程。服务器字符串为 PR64



实现
    public static function get supports64BitProcesses():Boolean

touchscreenType

属性 
touchscreenType:String  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 10.1, AIR 2

指定支持的触摸屏的类型(如果有)。值是在 flash.system.TouchscreenType 类中定义的。



实现
    public static function get touchscreenType():String

相关 API 元素


示例  ( 如何使用本示例 )
以下示例是一个简单测试,用于指示触摸屏的当前类型。测试该示例时,单击文本字段可查看属性值:
import flash.events.*;
import flash.display.*;
import flash.system.Capabilities;
import flash.text.TextField;

var capabilitiesTouchScreenTypeTxt:TextField = new TextField();
capabilitiesTouchScreenTypeTxt.width = 300;
capabilitiesTouchScreenTypeTxt.border = true;

addChild(capabilitiesTouchScreenTypeTxt);

addEventListener(MouseEvent.CLICK, getScreenKeyboardType);

function getScreenKeyboardType(e:MouseEvent):void{
    capabilitiesTouchScreenTypeTxt.text= "flash.system.Capabilities.touchscreenType is : " + flash.system.Capabilities.touchscreenType;
}

version

属性 
version:String  [只读]

语言版本: ActionScript 3.0
运行时版本: Flash Player 9, AIR 1.0, Flash Lite 4

指定 Flash Player 或 Adobe® AIR® 平台和版本信息。版本号的格式为:平台 (platform),主版本号 (majorVersion),次版本号 (minorVersion)、生成版本号 (buildNumber),内部生成版本号 (internalBuildNumber)platform 可能的值为 “WIN”“MAC”“LNX”“AND”。以下是一些版本信息示例:

	 WIN 9,0,0,0  // Flash Player 9 for Windows
	 MAC 7,0,25,0   // Flash Player 7 for Macintosh
	 LNX 9,0,115,0  // Flash Player 9 for Linux
	 AND 10,2,150,0 // Flash Player 10 for Android
	 

如果存在更具体的功能属性,请勿 使用 Capabilities.version 来根据操作系统确定功能。以操作系统来决定功能是个不良习惯,因为如果应用程序没有考虑到所有潜在的目标操作系统,这会产生问题。建议使用与要测试的功能相对应的属性。有关详细信息,请参阅 Capabilities 类的描述。

服务器字符串为 V



实现
    public static function get version():String

示例  ( 如何使用本示例 )
以下示例是一个简单测试,用于指示当前屏幕分辨率和操作系统版本。测试该示例时,单击文本字段可查看属性值:
import flash.events.*;
import flash.display.*;
import flash.system.Capabilities;
import flash.text.TextField;

var screenInfoTxt:TextField = new TextField();
screenInfoTxt.x = 30;
screenInfoTxt.y = 50;
screenInfoTxt.width = 300;
screenInfoTxt.height = 100;
screenInfoTxt.border = true;

addChild(screenInfoTxt);

addEventListener(MouseEvent.CLICK, getScreenNVersion);

function getScreenNVersion(e:MouseEvent):void{
    screenInfoTxt.text= "flash.system.Capabilities.screenResolutionX is : " + String(flash.system.Capabilities.screenResolutionX) + "\n" +
    "flash.system.Capabilities.screenResolutionY is : " + String(flash.system.Capabilities.screenResolutionY) + "\n" +
    "flash.system.Capabilities.version is : " + flash.system.Capabilities.version;
}
方法详细信息

hasMultiChannelAudio

()方法
public static function hasMultiChannelAudio(type:String):Boolean

语言版本: ActionScript 3.0
运行时版本: Flash Player 11, AIR 3

指定系统是否支持特定类型的多信道音频。类 flash.media.AudioDecoder 枚举可能的类型。

AIR 配置文件支持:仅 AIR for TV 设备支持多信道音频。在所有其他设备上,此方法始终返回 false。有关在多个配置文件之间支持 API 的详细信息,请参阅 AIR 配置文件支持

注意:当使用某个 DTS 音频编解码器时,存在 hasMultiChannelAudio() 返回 true 但不播放 DTS 音频的情况。例如,假设带有 S/PDIF 输出的蓝光播放器连接到旧功放。旧功放不支持 DTS,但 S/PDIF 没有协议通知蓝光播放器。如果蓝光播放器向旧功放发送 DTS 流,则用户什么也听不到。因此,最佳做法是,在使用 DTS 时提供一个用户界面,以便该用户可以知道是否在播放声音。然后,应用程序可以还原到其他的编解码器。

下表显示了每个多信道音频类型的服务器字符串:

多信道音频类型服务器字符串
AudioDecoder.DOLBY_DIGITALDD
AudioDecoder.DOLBY_DIGITAL_PLUSDDP
AudioDecoder.DTSDTS
AudioDecoder.DTS_EXPRESSDTE
AudioDecoder.DTS_HD_HIGH_RESOLUTION_AUDIODTH
AudioDecoder.DTS_HD_MASTER_AUDIODTM

参数

type:String — 一个表示多信道音频类型的字符串值。有效值为 flash.media.AudioDecoder 中定义的常数。

返回
Boolean — 如果系统支持 type 参数中传入的多信道音频类型,则为布尔值 true。否则,返回值为 false

相关 API 元素


示例  ( 如何使用本示例 )
以下代码跟踪对 hasMultiChannelAudio() 的调用的返回值。 返回值指示系统是否支持 Dolby Digital 多信道音频。
    trace(Capabilities.hasMultiChannelAudio(flash.media.AudioDecoder.DOLBY_DIGITAL);
    
CapabilitiesExample.as

下列示例输出在 flash.system.Capabilities 对象中找到的值。首先,此示例将值输出到文本字段中。然后,使用对 trace() 的多个调用输出值。
package {
    import flash.display.Sprite;
    import flash.system.Capabilities;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;

    public class CapabilitiesExample extends Sprite {
        
        public function CapabilitiesExample() {
            showCapabilities();
        }
        
        private function showCapabilities():void {
            var tf:TextField = new TextField();
            tf.height = 600;
            tf.width = 400;
            tf.autoSize = TextFieldAutoSize.LEFT;
            tf.wordWrap = true;
            
            tf.text = "avHardwareDisable: " + Capabilities.avHardwareDisable +
                
                "\nhasAccessibility: " + Capabilities.hasAccessibility +
                "\nhasAudio: " + Capabilities.hasAudio +
                "\nhasAudioEncoder: " + Capabilities.hasAudioEncoder +
                "\nhasEmbeddedVideo: " + Capabilities.hasEmbeddedVideo +
                "\nhasIME: " + Capabilities.hasIME +
                "\nhasMP3: " + Capabilities.hasMP3 +
                "\nhasPrinting: " + Capabilities.hasPrinting +
                "\nhasScreenBroadcast: " + Capabilities.hasScreenBroadcast +
                "\nhasScreenPlayback: " + Capabilities.hasScreenPlayback +
                "\nhasStreamingAudio: " + Capabilities.hasStreamingAudio +
                "\nhasStreamingVideo: " + Capabilities.hasStreamingVideo +
                "\nhasTLS: " + Capabilities.hasTLS +
                "\nhasVideoEncoder: " + Capabilities.hasVideoEncoder +
                "\nisDebugger: " + Capabilities.isDebugger +
                "\nisEmbeddedInAcrobat: " + Capabilities.isEmbeddedInAcrobat +
                "\nlanguage: " + Capabilities.language +
                "\nlocalFileReadDisable: " + Capabilities.localFileReadDisable +
                "\nmanufacturer: " + Capabilities.manufacturer +
                "\nmaxLevelIDC: " + Capabilities.maxLevelIDC +
                "\nos: " + Capabilities.os +
                "\npixelAspectRatio: " + Capabilities.pixelAspectRatio +
                "\nplayerType: " + Capabilities.playerType +
                "\nscreenColor: " + Capabilities.screenColor +
                "\nscreenDPI: " + Capabilities.screenDPI +
                "\nscreenResolutionX: " + Capabilities.screenResolutionX +
                "\nscreenResolutionY: " + Capabilities.screenResolutionY +
                "\nserverString: " + Capabilities.serverString +
                "\ntouchscreenType: " + Capabilities.touchscreenType +
                
                // The following capabilities are supported only when publishing for AIR.
                // If you are publishing for AIR, uncomment the following lines.
                //"\nlanguages: " + Capabilities.languages +
                //"\ncpuArchitecture: " + Capabilities.cpuArchitecture +
                //"\nsupports32BitProcesses: " + Capabilities.supports32BitProcesses +
                //"\nsupports64BitProcesses: " + Capabilities.supports64BitProcesses +    
                                
                "\nversion: " + Capabilities.version;
                
            addChild(tf);   
                
            trace("avHardwareDisable: " + Capabilities.avHardwareDisable);
            trace("hasAccessibility: " + Capabilities.hasAccessibility);
            trace("hasAudio: " + Capabilities.hasAudio);
            trace("hasAudioEncoder: " + Capabilities.hasAudioEncoder);
            trace("hasEmbeddedVideo: " + Capabilities.hasEmbeddedVideo);
            trace("hasIME: " + Capabilities.hasIME);
            trace("hasMP3: " + Capabilities.hasMP3);
            trace("hasPrinting: " + Capabilities.hasPrinting);
            trace("hasScreenBroadcast: " + Capabilities.hasScreenBroadcast);
            trace("hasScreenPlayback: " + Capabilities.hasScreenPlayback);
            trace("hasStreamingAudio: " + Capabilities.hasStreamingAudio);
            trace("hasStreamingVideo: " + Capabilities.hasStreamingVideo);
            trace("hasTLS: " + Capabilities.hasTLS);
            trace("hasVideoEncoder: " + Capabilities.hasVideoEncoder);
            trace("isDebugger: " + Capabilities.isDebugger);
            trace("isEmbeddedInAcrobat: " + Capabilities.isEmbeddedInAcrobat);
            trace("language: " + Capabilities.language);
            trace("localFileReadDisable: " + Capabilities.localFileReadDisable);
            trace("manufacturer: " + Capabilities.manufacturer);
            trace("maxLevelIDC: " + Capabilities.maxLevelIDC);
            trace("os: " + Capabilities.os);
            trace("pixelAspectRatio: " + Capabilities.pixelAspectRatio);
            trace("playerType: " + Capabilities.playerType);
            trace("screenColor: " + Capabilities.screenColor);
            trace("screenDPI: " + Capabilities.screenDPI);
            trace("screenResolutionX: " + Capabilities.screenResolutionX);
            trace("screenResolutionY: " + Capabilities.screenResolutionY);
            trace("serverString: " + Capabilities.serverString);
            trace("touchscreenType: " + Capabilities.touchscreenType);
            
            // The following capabilities are supported only when publishing for AIR.
            // If you are publishing for AIR, uncomment the following lines.       
            //trace("cpuArchitecture: " + Capabilities.cpuArchitecture);
            //trace("languages: " + Capabilities.languages);
            //trace("supports32BitProcesses: " + Capabilities.supports32BitProcesses);
            //trace("supports64BitProcesses: " + Capabilities.supports64BitProcesses);        
                        
            trace("version: " + Capabilities.version);
       
        }
    }
}





[ X ]为什么显示为英语?
《ActionScript 3.0 参考》中的内容以英语显示

《ActionScript 3.0 参考》中的部分内容未翻译成所有语言。当某个语言元素未翻译时,将显示为英语。例如,ga.controls.HelpBox 类未翻译成任何语言。因此在简体中文版的参考中,ga.controls.HelpBox 类显示为英语。