| 套件 | org.osmf.containers | 
| 類別 | public class HTMLMediaContainer | 
| 繼承 | HTMLMediaContainer    Object | 
| 實作 | IMediaContainer | 
| 語言版本: | ActionScript 3.0 | 
| 產品版本: | OSMF 1.0 | 
| 執行階段版本: | Flash Player 10, AIR 1.5 | 
公用方法 
| 方法 | 定義自 | ||
|---|---|---|---|
HTMLMediaContainer(containerIdentifier:String = null) 
		 Constructor.  | HTMLMediaContainer | ||
![]()  | 
	 指出物件是否有已定義的指定屬性。  | Object | |
![]()  | 
	 指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。  | Object | |
![]()  | 
	 指出指定的屬性是否存在,以及是否可列舉。  | Object | |
![]()  | 
     為迴圈作業設定動態屬性的可用性。  | Object | |
![]()  | 
	 傳回代表此物件的字串,根據地區特定慣例進行格式化。  | Object | |
![]()  | 
	 會傳回指定之物件的字串形式。  | Object | |
![]()  | 
	 會傳回指定之物件的基本值。  | Object | |
建構函式詳細資料
HTMLMediaContainer | () | 建構函式 | 
public function HTMLMediaContainer(containerIdentifier:String = null)| 語言版本: | ActionScript 3.0 | 
| 產品版本: | OSMF 1.0 | 
| 執行階段版本: | Flash Player 10, AIR 1.5 | 
Constructor.
參數containerIdentifier:String (default = null) — The identifier that will be used for this container
		 in JavaScript. If no identifier is specified, a random one will be generated.
		 
		  
		   | 
範例 如何使用本範例 
HTMLMediaContainerExample.as
package
{
    import flash.display.Sprite;
    
    import org.osmf.elements.HTMLElement;
    import org.osmf.media.URLResource;
    public class HTMLMediaContainerExample extends Sprite
    {
        public function HTMLMediaContainerExample()
        {
            super();
            
            // This will invoke a JavaScript callback (onHTMLMediaContainerConstructed(container))
            // that may be used to add listeners to new elements being added or removed to the 
            // container.
            var container:HTMLMediaContainer = new HTMLMediaContainer();
            
            var element:HTMLElement = new HTMLElement();
            element.resource = new URLResource("http://example.com/an/asset/JS/will/handle.pgn");
            
            // This will invoke a JavaScript callback (container.onElementAdd(element)) that
            // allows JavaScript to process the passed URL, and to communicate back to the 
            // framework what traits the element will support:
            container.addMediaElement(element);
        }
        
    }
}
Tue Jun 12 2018, 03:47 PM Z
 
 隱藏繼承公用屬性
 顯示繼承公用屬性