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

Video  - 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.media
類別public class Video
繼承Video Inheritance DisplayObject Inheritance EventDispatcher Inheritance Object
子類別 VideoPlayer

語言版本: ActionScript 3.0
執行階段版本: AIR 1.0, Flash Player 9, Flash Lite 4

Video 類別會在應用程式中顯示即時或錄製的視訊,不會將視訊內嵌到您的 SWF 檔中。 這個類別會建立 Video 物件,播放以下任一種類的視訊:儲存在伺服器或是本機的視訊檔案,或是使用者擷取的即時視訊。Video 物件是應用程式顯示清單上的顯示物件,代表供視訊在使用者介面中執行的視覺空間。

與 Flash Media Server 搭配使用時,Video 物件可讓您傳送使用者擷取的即時視訊到伺服器,然後從伺服器廣播給其他使用者。您可以利用這些功能開發媒體應用程式,例如簡單的視訊播放程式、從一部伺服器多點發佈到其它伺服器的視訊播放程式,以及使用者社群的視訊共用應用程式。

Flash Player 9 和更新版本支援發佈和播放以 Sorenson Spark 或 On2 VP6 轉碼器編碼的 FLV 檔,另外也支援 Alpha 色版。相較於以往的技術,On2 VP6 視訊轉碼器使用較少的頻寬,並提供額外的消除馬賽克和消除環狀色斑濾鏡程式。如需有關視訊播放與支援格式的詳細資訊,請參閱「flash.net.NetStream 類別」。

Flash Player 9.0.115.0 和更新版本支援 Mip 映射 (Mipmapping),使執行階段顯示品質和效能達到最佳化。如果您將 Video 物件的 smoothing 屬性設定為 true,Flash Player 會在播放視訊時使用 Mip 映射 (Mipmapping) 最佳化。

從 AIR 25 開始, app.xml 中為 Android 引進了名為 disableMediaCodec 的新標籤。將這個標籤設定為 true 會停用 mediacodec,且視訊會使用 OpenMax AL 進行解碼。否則,會啟用 mediacodec。根據預設,這個標籤的值為 false

就像顯示清單上的其它顯示物件一樣,您可以控制 Video 物件的許多屬性。 例如,您可以使用 Video 物件的 xy 屬性,將它移動到「舞台」上的各個位置,並使用它的 heightwidth 屬性來變更大小,依此類推。

若要播放視訊串流,請使用 attachCamera()attachNetStream() 將視訊附加至 Video 物件。 然後使用 addChild() 將 Video 物件加入顯示清單。

如果您使用的是 Flash Professional,您也可以將 Video 物件置於「舞台」上,而不是用 addChild() 加入它,例如:

  1. 如果看不見「元件庫」面板,請選取「視窗 > 元件庫」來顯示它。
  2. 將嵌入的 Video 物件新增到元件庫,按一下「元件庫」面板標題列右方的「選項」選單,並選取「新增視訊」。
  3. 在「視訊屬性」對話方塊中,為內嵌的 Video 物件命名以供元件庫使用,然後按一下「確定」。
  4. 將 Video 物件拖曳到「舞台」上,並使用「屬性」檢測器賦予它唯一的實體名稱,例如 my_video。 (請勿將它命名為 Video)。

在桌面的 AIR 應用程式中,以全螢幕模式播放視訊會停用任何省電或螢幕保護功能 (若作業系統允許)。

注意:由於 Video 類別並非 InteractiveObject 類別的子類別,所以無法傳送滑鼠事件。 但是您可以對包含 Video 物件的顯示物件容器呼叫 addEventListener() 方法。

檢視範例

詳細資訊

相關 API 元素



公用屬性
 屬性定義自
 InheritedaccessibilityProperties : AccessibilityProperties
此顯示物件的目前輔助功能選項。
DisplayObject
 Inheritedalpha : Number
指出所指定物件的 Alpha 透明度值。
DisplayObject
 InheritedblendMode : String
來自 BlendMode 類別的值,會指定要使用何種混合模式。
DisplayObject
 InheritedblendShader : Shader
[唯寫] 設定用來混合前景和背景的著色器。
DisplayObject
 InheritedcacheAsBitmap : Boolean
如果設定為 true,Flash 執行階段會快取顯示物件的內部點陣圖表示法。
DisplayObject
 Inherited    cacheAsBitmapMatrix : Matrix
如果為非 null,當 cacheAsBitmap 設定為 true 時,這個 Matrix 物件會定義顯示物件的顯示方法。
DisplayObject
 Inheritedconstructor : Object
類別物件的參照或是特定物件實體的建構函數。
Object
  deblocking : int
指出套用到解碼視訊做為後置處理之一部份的濾鏡類型。
Video
 Inheritedfilters : Array
索引的陣列,其中包含目前和顯示物件相關的每個濾鏡物件。
DisplayObject
 Inheritedheight : Number
會指出顯示物件的高度,以像素為單位。
DisplayObject
 InheritedloaderInfo : LoaderInfo
[唯讀] 會傳回 LoaderInfo 物件,其中包含關於載入此顯示物件所屬之檔案的資訊。
DisplayObject
 Inheritedmask : DisplayObject
呼叫之顯示物件會以指定的 mask 物件遮蓋。
DisplayObject
 InheritedmetaData : Object
如果中繼資料是透過 PlaceObject4 標籤與 SWF 檔案中的這個 DisplayObject 實體一同儲存,則會取得 DisplayObject 實體的中繼資料物件。
DisplayObject
 InheritedmouseX : Number
[唯讀] 指出滑鼠或使用者輸入裝置位置的 x 座標,以像素為單位。
DisplayObject
 InheritedmouseY : Number
[唯讀] 指出滑鼠或使用者輸入裝置位置的 y 座標,以像素為單位。
DisplayObject
 Inheritedname : String
指出 DisplayObject 的實體名稱。
DisplayObject
 InheritedopaqueBackground : Object
會指定顯示物件是否不透明,並具有特定背景顏色。
DisplayObject
 Inheritedparent : DisplayObjectContainer
[唯讀] 指出包含此顯示物件的 DisplayObjectContainer 物件。
DisplayObject
 Inheritedroot : DisplayObject
[唯讀] 對載入之 SWF 檔案的顯示物件而言,root 屬性就是該 SWF 檔案所呈現之顯示清單樹狀結構部分的最上層顯示物件。
DisplayObject
 Inheritedrotation : Number
指出 DisplayObject 實體的旋轉度數 (從該物件原本方向算起)。
DisplayObject
 InheritedrotationX : Number
表示 DisplayObject 實體相對於 3D 父輩容器從原始方向旋轉的 x 軸旋轉 (以度數為單位)。
DisplayObject
 InheritedrotationY : Number
表示 DisplayObject 實體相對於 3D 父輩容器從原始方向旋轉的 y 軸旋轉 (以度數為單位)。
DisplayObject
 InheritedrotationZ : Number
表示 DisplayObject 實體相對於 3D 父輩容器從原始方向旋轉的 z 軸旋轉 (以度數為單位)。
DisplayObject
 Inheritedscale9Grid : Rectangle
目前產生效用的縮放格線。
DisplayObject
 InheritedscaleX : Number
指出從註冊點套用的物件水平縮放 (百分比)。
DisplayObject
 InheritedscaleY : Number
指出從物件註冊點套用的物件垂直縮放 (百分比)。
DisplayObject
 InheritedscaleZ : Number
指出從物件註冊點套用的物件深度縮放 (百分比)。
DisplayObject
 InheritedscrollRect : Rectangle
顯示物件的捲動矩形範圍。
DisplayObject
  smoothing : Boolean
指定是否需要在視訊縮放時進行平滑處理 (漸變影格)。
Video
 Inheritedstage : Stage
[唯讀] 顯示物件的「舞台」。
DisplayObject
 Inheritedtransform : flash.geom:Transform
這是一個物件,具有和顯示物件的矩陣、顏色轉換和像素邊界有關的屬性。
DisplayObject
  videoHeight : int
[唯讀] 指定視訊串流高度的整數,以像素為單位。
Video
  videoWidth : int
[唯讀] 指定視訊串流寬度的整數,以像素為單位。
Video
 Inheritedvisible : Boolean
不管是否看得見顯示物件。
DisplayObject
 Inheritedwidth : Number
會指出顯示物件的寬度,以像素為單位。
DisplayObject
 Inheritedx : Number
指出 DisplayObject 實體相對於父輩 DisplayObjectContainer 之區域座標的 x 座標。
DisplayObject
 Inheritedy : Number
指出 DisplayObject 實體相對於父輩 DisplayObjectContainer 之區域座標的 y 座標。
DisplayObject
 Inheritedz : Number
表示 DisplayObject 實體相對於 3D 父輩容器的 z 座標位置 (沿著 z 軸)。
DisplayObject
公用方法
 方法定義自
  
Video(width:int = 320, height:int = 240)
會建立新的 Video 實體。
Video
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。
EventDispatcher
  
指定來自攝影機且即將在應用程式中 Video 物件邊界範圍內顯示的視訊串流。
Video
  
指定即將在應用程式中 Video 物件邊界範圍內顯示的視訊串流。
Video
  
清除目前顯示在 Video 物件 (而非視訊串流) 中的影像。
Video
 Inherited
會將事件傳送到事件流程。
EventDispatcher
 Inherited
getBounds(targetCoordinateSpace:DisplayObject):Rectangle
傳回可定義顯示物件區域 (相對於 targetCoordinateSpace 物件的座標系統) 的矩形。
DisplayObject
 Inherited
getRect(targetCoordinateSpace:DisplayObject):Rectangle
根據 targetCoordinateSpace 參數所定義的座標系統,並排除形狀上的任何筆畫,傳回可定義顯示物件邊界的矩形。
DisplayObject
 Inherited
將 point 物件從「舞台」(全域) 座標轉換成顯示物件的 (區域) 座標。
DisplayObject
 Inherited
將二維點從「舞台」(全域) 座標轉換為三維顯示物件的 (區域) 座標。
DisplayObject
 Inherited
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。
EventDispatcher
 Inherited
指出物件是否有已定義的指定屬性。
Object
 Inherited
評估顯示物件的範圍框,看它是否與 obj 顯示物件的範圍框重疊或相交。
DisplayObject
 Inherited
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
評估顯示物件,看它是否與 x 和 y 參數所指定的點重疊或相交。
DisplayObject
 Inherited
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。
Object
 Inherited
將三維顯示物件的 (區域) 座標的三維點轉換為「舞台」(全域) 座標中的二維點。
DisplayObject
 Inherited
將 point 物件從顯示物件的 (區域) 座標轉換成「舞台」(全域) 座標。
DisplayObject
 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
 Inherited當顯示物件加入顯示清單中時傳送。DisplayObject
 Inherited會在顯示物件加入舞台上的顯示清單時,以直接或是透過加入包含該顯示物件之子樹狀結構的方式傳送。DisplayObject
 Inherited[廣播事件] 當 Flash Player 或 AIR 應用程式失去作業系統焦點並成為非作用中時傳送。EventDispatcher
 Inherited[廣播事件] 當播放磁頭進入新影格時傳送。DisplayObject
 Inherited[廣播事件] 當播放磁頭結束目前影格時傳送。DisplayObject
 Inherited[廣播事件] 在影格顯示物件的建構函式執行之後,且影格指令碼執行之前傳送。DisplayObject
 Inherited會當顯示物件將要從顯示清單移除時傳送。DisplayObject
 Inherited會在顯示物件即將從顯示清單移除時,以直接或是透過移除包含該顯示物件之子樹狀結構的方式傳送。DisplayObject
 Inherited[廣播事件] 當顯示清單將要更新和顯示時傳送。DisplayObject
屬性詳細資訊

deblocking

屬性
deblocking:int

語言版本: ActionScript 3.0
執行階段版本: AIR 1.0, Flash Player 9, Flash Lite 4

指出套用到解碼視訊做為後置處理之一部份的濾鏡類型。 預設值為 0,可讓視訊壓縮程式視需要套用消除馬賽克的濾鏡。

視訊的壓縮可能會產生不想要的雜訊。 您可以使用 deblocking 屬性來設定濾鏡,以便減少馬賽克和環狀色斑 (針對使用 On2 轉碼器壓縮的視訊)。

「馬賽克」是指組成每個視訊影格的區塊邊界之間的可見瑕疵。 「環狀色斑」是指視訊影像內各元素周圍的扭曲邊緣。

您可以使用兩種消除馬賽克濾鏡: 一種是在 Sorenson 轉碼器中,而另一種則在 On2 VP6 轉碼器中。 此外,當您使用 On2 VP6 轉碼器時,可以使用消除環狀色斑濾鏡。 若要設定濾鏡,請使用下列其中一個值:

  • 0 - 讓視訊壓縮程式視需要套用消除馬賽克濾鏡。
  • 1 - 不使用消除馬賽克濾鏡。
  • 2 - 使用 Sorenson 消除馬賽克濾鏡。
  • 3 - (僅適用於 On2 視訊) 使用 On2 消除馬賽克濾鏡,但不使用消除環狀色斑濾鏡。
  • 4 - (僅適用於 On2 視訊) 使用 On2 消除馬賽克和消除環狀色斑濾鏡。
  • 5 - (僅適用於 On2 視訊) 使用 On2 消除馬賽克和消除環狀色斑濾鏡。

如果使用 Sorenson 轉碼器時為視訊選取 2 以上的值,Sorenson 解碼器會預設為 2。

使用消除馬賽克濾鏡會影響整體的播放效果,因此高頻寬的視訊通常都不會用到。 如果使用者的系統功能不夠強,在啟用消除馬賽克濾鏡時,可能會遇到播放視訊方面的困難。



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

smoothing

屬性 
smoothing:Boolean

語言版本: ActionScript 3.0
執行階段版本: AIR 1.0, Flash Player 9, Flash Lite 4

指定是否需要在視訊縮放時進行平滑處理 (漸變影格)。 如果要讓平滑處理作業發揮作用,執行階段就必須處於高品質的模式中 (預設)。預設值是 false (不平滑處理)。

若要使用 Flash Player 9.0.115.0 和更新版本播放視訊,請將此屬性設定為 true,以便利用 Mip 映射影像最佳化。



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

videoHeight

屬性 
videoHeight:int  [唯讀]

語言版本: ActionScript 3.0
執行階段版本: AIR 1.0, Flash Player 9, Flash Lite 4

指定視訊串流高度的整數,以像素為單位。 對於即時串流來說,這個值和 Camera 物件的 Camera.height 屬性相同,此 Camera 物件指的是正在捕捉視訊串流的 Camera 物件。 針對錄製的視訊檔案,此值為視訊的高度。若是錄製的視訊,則當此值變更時就會傳送 NetStream.Video.DimensionChange 事件。

例如,若您要確保不論 Video 物件在舞台上實際的大小如何,使用者所看到的視訊和它們被擷取時大小相同,則您可能要使用這個屬性。



實作
    public function get videoHeight():int

相關 API 元素

videoWidth

屬性 
videoWidth:int  [唯讀]

語言版本: ActionScript 3.0
執行階段版本: AIR 1.0, Flash Player 9, Flash Lite 4

指定視訊串流寬度的整數,以像素為單位。 對於即時串流來說,這個值和 Camera 物件的 Camera.width 屬性相同,此 Camera 物件指的是正在捕捉視訊串流的 Camera 物件。 針對錄製的視訊檔案,此值為視訊的寬度。若是錄製的視訊,則當此值變更時就會傳送 NetStream.Video.DimensionChange 事件。

例如,若您要確保不論 Video 物件在舞台上實際的大小如何,使用者所看到的視訊和它們被擷取時大小相同,則您可能要使用這個屬性。



實作
    public function get videoWidth():int

相關 API 元素

建構函式詳細資料

Video

()建構函式
public function Video(width:int = 320, height:int = 240)

語言版本: ActionScript 3.0
執行階段版本: AIR 1.0, Flash Player 9

會建立新的 Video 實體。 如果沒有提供 widthheight 參數的值,就會使用預設值。 您也可以在初始建構之後,使用 Video.widthVideo.height 設定 Video 物件的寬度和高度屬性。 建立新的 Video 物件後,寬度或高度就不允許輸入零這個值。如果您傳遞零,就會套用預設值。

建立 Video 後,請呼叫 DisplayObjectContainer.addChild()DisplayObjectContainer.addChildAt() 方法,將 Video 物件加入父 DisplayObjectContainer 物件。

參數
width:int (default = 320) — 視訊的寬度,以像素為單位。
 
height:int (default = 240) — 視訊的高度,以像素為單位。

範例  ( 如何使用本範例 )

以下範例顯示如何載入外部 FLV 檔案:
var MyVideo:Video = new Video();
addChild(MyVideo);
 
var MyNC:NetConnection = new NetConnection();
MyNC.connect(null);
 
var MyNS:NetStream = new NetStream(MyNC);
MyNS.play("http://www.helpexamples.com/flash/video/clouds.flv");

MyVideo.attachNetStream(MyNS);

//the clouds.flv video has metadata we're not using, so create
//an error handler to ignore the message generated by the runtime
//about the metadata
MyNS.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); 

function asyncErrorHandler(event:AsyncErrorEvent):void 
{ 
   //ignore metadata error message
} 
方法詳細資訊

attachCamera

()方法
public function attachCamera(camera:Camera):void

語言版本: ActionScript 3.0
執行階段版本: AIR 1.0, Flash Player 9

指定來自攝影機且即將在應用程式中 Video 物件邊界範圍內顯示的視訊串流。

使用這個方法附加使用者擷取的即時視訊至 Video 物件。您可以在擷取即時視訊的相同本機電腦或裝置上播放,也可以將它傳到 Flash Media Server 並使用伺服器將它串流給其他使用者。

注意:在 iOS AIR 應用程式中,當應用程式使用 GPU 顯示模式時,無法顯示攝影機視訊。

參數

camera:Camera — 正在捕捉視訊資料的 Camera 物件。 若要丟棄 Video 物件的連線,請傳遞 null

相關 API 元素


範例
如何使用本範例
請參閱 Camera.getCamera() 方法的範例,以取得使用此方法的詳細指示。

attachNetStream

()方法 
public function attachNetStream(netStream:NetStream):void

語言版本: ActionScript 3.0
執行階段版本: AIR 1.0, Flash Player 9, Flash Lite 4

指定即將在應用程式中 Video 物件邊界範圍內顯示的視訊串流。 視訊串流是以 NetStream.play() 播放的視訊檔案、Camera 物件或 null。如果您使用視訊檔案,它可以儲存在本機檔案系統或 Flash Media Server 上。如果 netStream 引數的值是 null,則視訊便不會於 Video 物件中播放。

如果視訊檔案只包含音效,您就不必使用這個方法;呼叫 NetStream.play() 時,就會自動播放視訊檔案的音效部分。若要控制與視訊檔案關聯的音效,請使用播放視訊檔案之 NetStream 物件的 soundTransform 屬性。

參數

netStream:NetStream — NetStream 物件。 若要丟棄 Video 物件的連線,請傳遞 null

相關 API 元素

clear

()方法 
public function clear():void

語言版本: ActionScript 3.0
執行階段版本: AIR 1.0, Flash Player 9, Flash Lite 4

清除目前顯示在 Video 物件 (而非視訊串流) 中的影像。這個方法有助於處理目前的影像。例如,您可以清除上一個影像或顯示待用資訊,而不必隱藏 Video 物件。

相關 API 元素

VideoExample.as

下列範例會使用 Video 物件與 NetConnection 和 NetStream 類別,以載入並播放 FLV 檔案。 如果要執行這個範例,FLV 檔的名稱和位置必須與傳遞給 videoURL 的變數相符,在這個範例中,名為 Video.flv 的 FLV 檔是與 SWF 檔位於相同的目錄中。

在這個範例中,是將建立 Video 和 NetStream 物件的程式碼與呼叫 Video.attachNetStream()NetStream.play() 置入處理常式函數中。 只有在嘗試連線至 NetConnection 物件成功後才會呼叫處理常式,也就是 netStatus 事件傳回的 info 物件中含有表示成功的 code 屬性。 建議您先等候連線成功,然後再呼叫 NetStream.play()

 package {
    import flash.display.Sprite;
    import flash.events.*;
    import flash.media.Video;
    import flash.net.NetConnection;
    import flash.net.NetStream;

    public class VideoExample extends Sprite {
        private var videoURL:String = "Video.flv";
        private var connection:NetConnection;
        private var stream:NetStream;

        public function VideoExample() {
            connection = new NetConnection();
            connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
            connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
            connection.connect(null);
        }

        private function netStatusHandler(event:NetStatusEvent):void {
            switch (event.info.code) {
                case "NetConnection.Connect.Success":
                    connectStream();
                    break;
                case "NetStream.Play.StreamNotFound":
                    trace("Unable to locate video: " + videoURL);
                    break;
            }
        }

        private function connectStream():void {
            stream = new NetStream(connection);
            stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
            stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
            var video:Video = new Video();
            video.attachNetStream(stream);
            stream.play(videoURL);
            addChild(video);
        }

        private function securityErrorHandler(event:SecurityErrorEvent):void {
            trace("securityErrorHandler: " + event);
        }
        
        private function asyncErrorHandler(event:AsyncErrorEvent):void {
            // ignore AsyncErrorEvent events.
        }
    }
 }




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

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