Pacchetto | org.osmf.elements |
Classe | public class F4MElement |
Ereditarietà | F4MElement ![]() ![]() ![]() ![]() ![]() |
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
The basic steps for creating and using an F4MElement are:
- Create a new URLResource pointing to the URL of the F4M file.
- Create the new F4MElement, passing the URLResource as a parameter.
- Create a new MediaPlayer.
- Assign the F4MElement to the MediaPlayer's
media
property. - Control the media using the MediaPlayer's methods, properties, and events.
- When done with the F4MElement, set the MediaPlayer's
media
property to null. This will unload the F4MElement.
Note: It is simplest to use the MediaPlayer class in conjunction with the F4MElement. If you work directly with an F4MElement, then it's important to listen for events related to traits being added and removed. If you use the MediaPlayer class with an F4MElement, then the MediaPlayer will automatically listen for these events for you.
Altre informazioni
Elementi API correlati
Proprietà pubbliche
Proprietà protette
Metodi pubblici
Metodo | Definito da | ||
---|---|---|---|
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registra un oggetto listener di eventi con un oggetto EventDispatcher, in modo che il listener riceva la notifica di un evento. | EventDispatcher | |
![]() |
Invia un evento nel flusso di eventi. | EventDispatcher | |
![]() |
Verifica se per l'oggetto EventDispatcher sono presenti listener registrati per un tipo specifico di evento. | EventDispatcher | |
![]() |
Indica se per un oggetto è definita una proprietà specifica. | Object | |
![]() |
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro. | Object | |
![]() |
Indica se la proprietà specificata esiste ed è enumerabile. | Object | |
![]() |
Rimuove un listener dall'oggetto EventDispatcher. | EventDispatcher | |
![]() |
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche. | Object | |
![]() |
Restituisce la rappresentazione in formato stringa di questo oggetto, formattato in base alle convenzioni specifiche per le versioni localizzate. | Object | |
![]() |
Restituisce la rappresentazione in formato stringa dell'oggetto specificato. | Object | |
![]() |
Restituisce il valore di base dell'oggetto specificato. | Object | |
![]() |
Verifica se un listener di eventi è registrato con questo oggetto EventDispatcher o qualsiasi suo antenato per il tipo di evento specificato. | EventDispatcher |
Metodi protetti
Eventi
Descrizione della funzione di costruzione
F4MElementExample.as
package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import org.osmf.elements.F4MElement; import org.osmf.elements.VideoElement; import org.osmf.media.MediaPlayer; import org.osmf.media.MediaPlayerSprite; import org.osmf.media.URLResource; public class F4MElementExample extends Sprite { public function F4MElementExample() { super(); stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; var mediaPlayerSprite:MediaPlayerSprite = new MediaPlayerSprite(); var manifestElement:F4MElement = new F4MElement(); manifestElement.resource = new URLResource("http://mediapm.edgesuite.net/osmf/content/test/manifest-files/progressive.f4m"); addChild(mediaPlayerSprite); mediaPlayerSprite.media = manifestElement; } } }
Tue Jun 12 2018, 02:44 PM Z