套件 | org.osmf.elements |
類別 | public class CompositeElement |
繼承 | CompositeElement MediaElement EventDispatcher Object |
子類別 | ParallelElement, SerialElement |
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
The media elements that make up a media composition are treated as a single, unified media element. For example, if a media composition encapsulates a sequence of videos, the CompositeElement will behave as if it's a single VideoElement, but one which plays several videos in sequence.
Because a CompositeElement maintains a list of MediaElement children, any of which may be CompositeElements themselves, a media composition can be expressed as a tree structure.
Typically a CompositeElement is not instantiated directly but instead is used as the base class for creating specific types of media compositions.
屬性 | 定義自 | ||
---|---|---|---|
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
container : IMediaContainer [唯讀]
The media container that this element uses. | MediaElement | ||
metadataNamespaceURLs : Vector.<String> [唯讀]
A Vector containing the namespace URLs for all Metadata
objects stored within this MediaElement. | MediaElement | ||
numChildren : int [唯讀]
The number of child MediaElements in this media composition. | CompositeElement | ||
resource : MediaResourceBase
The media resource that this media element operates on. | MediaElement | ||
traitTypes : Vector.<String> [唯讀]
A Vector of MediaTraitType values representing the trait types on this
media element. | MediaElement |
方法 | 定義自 | ||
---|---|---|---|
Constructor. | CompositeElement | ||
Adds the specified child to the end of the list. | CompositeElement | ||
Adds the child to the list at the specified index. | CompositeElement | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。 | EventDispatcher | ||
Adds a Metadata object to this MediaElement under the specified namespace URL. | MediaElement | ||
會將事件傳送到事件流程。 | EventDispatcher | ||
Gets the child at the specified index. | CompositeElement | ||
Returns the index of the child if it is in the list such that
getChildAt(index) == child. | CompositeElement | ||
Returns the Metadata object that is stored under this MediaElement with
the specified namespace URL. | MediaElement | ||
Returns the media trait of the specified type. | MediaElement | ||
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。 | EventDispatcher | ||
指出物件是否有已定義的指定屬性。 | Object | ||
Determines whether this media element has a media trait of the
specified type. | MediaElement | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
Removes the specified child and returns it. | CompositeElement | ||
Removes the child at the specified index and returns it. | CompositeElement | ||
會從 EventDispatcher 物件移除偵聽程式。 | EventDispatcher | ||
Removes the Metadata object that was stored under this MediaElement with
the specified namespace URL. | MediaElement | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object | ||
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。 | EventDispatcher |
numChildren | 屬性 |
CompositeElement | () | 建構函式 |
public function CompositeElement()
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Constructor.
addChild | () | 方法 |
public function addChild(child:MediaElement):MediaElement
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Adds the specified child to the end of the list. Equivalent to
addChildAt(child,numChildren)
.
參數
child:MediaElement — The child to add.
|
MediaElement — The MediaElement that you pass in the child parameter.
|
擲回值
ArgumentError — If child is null .
| |
RangeError — If the specified index is less than zero or
greater than the length of the list.
| |
Error — If the child is already a child.
|
addChildAt | () | 方法 |
public function addChildAt(child:MediaElement, index:Number):MediaElement
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Adds the child to the list at the specified index. If a child already exists at this index, it and all subsequent children will have their index positions increased by one.
參數
child:MediaElement — The child to add.
| |
index:Number — The index position at which to add the child.
|
MediaElement — The MediaElement that you pass in the child parameter.
|
擲回值
ArgumentError — If child is null .
| |
RangeError — If the specified index is less than zero or
greater than the length of the list.
| |
Error — If the child is already a child.
|
getChildAt | () | 方法 |
public function getChildAt(index:int):MediaElement
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Gets the child at the specified index.
參數
index:int — The index in the list from which to retrieve the child.
|
MediaElement — The child at that index or null if there is none.
|
getChildIndex | () | 方法 |
public function getChildIndex(child:MediaElement):int
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Returns the index of the child if it is in the list such that
getChildAt(index) == child
.
參數
child:MediaElement — The child to find.
|
int — The index of the child or -1 if the child is not in the
list.
|
removeChild | () | 方法 |
public function removeChild(child:MediaElement):MediaElement
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Removes the specified child and returns it. Equivalent to
removeChildAt(child,getChildIndex(child))
.
參數
child:MediaElement — The child MediaElement to remove.
|
MediaElement — The MediaElement that you pass in the child parameter.
|
擲回值
ArgumentError — If the child is not a child of this composition.
|
removeChildAt | () | 方法 |
public function removeChildAt(index:int):MediaElement
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Removes the child at the specified index and returns it. Any children with index positions greater than this index have their index positions decreased by one.
參數
index:int — The index from which to remove the child.
|
MediaElement — The child at that index.
|
擲回值
RangeError — If the specified index is less than zero or
greater than the length of the list.
|
Tue Jun 12 2018, 03:47 PM Z