Pacchetto | org.osmf.traits |
Classe | public class LoadTrait |
Ereditarietà | LoadTrait MediaTraitBase EventDispatcher Object |
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
If hasTrait(MediaTraitType.LOAD)
returns true
,
use the MediaElement.getTrait(MediaTraitType.LOAD)
method
to get an object of this type.
Elementi API correlati
Proprietà | Definito da | ||
---|---|---|---|
bytesLoaded : Number [sola lettura]
The number of bytes of data that have been loaded. | LoadTrait | ||
bytesTotal : Number [sola lettura]
The total size in bytes of the data being loaded. | LoadTrait | ||
constructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto. | Object | ||
loadState : String [sola lettura]
The load state of this trait. | LoadTrait | ||
resource : MediaResourceBase [sola lettura]
Resource representing the piece of media to be loaded into
this LoadTrait. | LoadTrait | ||
traitType : String [sola lettura]
The MediaTraitType for this trait. | MediaTraitBase |
Metodo | Definito da | ||
---|---|---|---|
Constructor. | LoadTrait | ||
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 | ||
Disposes of any resources used by this trait. | MediaTraitBase | ||
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 | ||
Loads this the media into this LoadTrait. | LoadTrait | ||
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 | ||
Unloads this LoadTrait. | LoadTrait | ||
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 |
Metodo | Definito da | ||
---|---|---|---|
Called just after the bytesLoaded property has changed. | LoadTrait | ||
Called immediately before the bytesLoaded property is changed. | LoadTrait | ||
Called just after the bytesTotal property has changed. | LoadTrait | ||
Called immediately before the bytesTotal property is changed. | LoadTrait | ||
Called just after the loadState property is
change. | LoadTrait | ||
Called immediately before the loadState
property is changed. | LoadTrait | ||
Sets the number of bytes of data that have been loaded. | LoadTrait | ||
Sets the total size in bytes of the data being loaded. | LoadTrait | ||
Sets the load state for this LoadTrait. | LoadTrait |
Evento | Riepilogo | Definito da | ||
---|---|---|---|---|
[evento di trasmissione] Inviato quando Flash Player o l'applicazione AIR ottiene lo stato di attivazione del sistema operativo ed entra nello stato attivo. | EventDispatcher | |||
Dispatched when total size in bytes of data being loaded has changed. | LoadTrait | |||
[evento di trasmissione] Inviato quando Flash Player o l'applicazione AIR perde l'attivazione del sistema operativo e sta entrando nello stato inattivo. | EventDispatcher | |||
Dispatched when the state of the LoadTrait has changed. | LoadTrait |
bytesLoaded | proprietà |
bytesTotal | proprietà |
loadState | proprietà |
resource | proprietà |
resource:MediaResourceBase
[sola lettura] Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Resource representing the piece of media to be loaded into this LoadTrait.
Implementazione
public function get resource():MediaResourceBase
LoadTrait | () | Funzione di costruzione |
public function LoadTrait(loader:LoaderBase, resource:MediaResourceBase)
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Constructor.
Parametriloader:LoaderBase — The LoaderBase instance that will be used to load the
media for the media element that owns this trait.
| |
resource:MediaResourceBase — The MediaResourceBase instance that represents the media resource
to be loaded.
|
bytesLoadedChangeEnd | () | metodo |
protected function bytesLoadedChangeEnd():void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Called just after the bytesLoaded
property has changed.
bytesLoadedChangeStart | () | metodo |
protected function bytesLoadedChangeStart(newValue:Number):void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Called immediately before the bytesLoaded
property is changed.
Subclasses can override this method to communicate the change to the media.
Parametri
newValue:Number — New bytesLoaded value.
|
bytesTotalChangeEnd | () | metodo |
protected function bytesTotalChangeEnd():void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Called just after the bytesTotal
property has changed.
Dispatches the bytesTotalChange event.
Subclasses that override should call this method to dispatch the bytesTotalChange event.
bytesTotalChangeStart | () | metodo |
protected function bytesTotalChangeStart(newValue:Number):void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Called immediately before the bytesTotal
property is changed.
Subclasses can override this method to communicate the change to the media.
Parametri
newValue:Number — New bytesTotal value.
|
load | () | metodo |
public function load():void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Loads this the media into this LoadTrait.
Updates the load state.
Dispatches the loadStateChange
event with every state change.
Typical states are LOADING
while the media is loading,
READY
after it has successfully completed loading,
and LOAD_ERROR
if it fails to complete loading.
If the LoadState is LOADING
or READY
when the method is called, throws an error.
Genera
IllegalOperationError — If this trait is unable to load
itself or if the LoadState is LOADING or
READY .
|
Elementi API correlati
loadStateChangeEnd | () | metodo |
protected function loadStateChangeEnd():void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Called just after the loadState
property is
change.
loadStateChangeStart | () | metodo |
protected function loadStateChangeStart(newState:String):void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Called immediately before the loadState
property is changed.
Subclasses can override this method to communicate the change to the media.
Parametri
newState:String — New loadState value.
|
setBytesLoaded | () | metodo |
protected final function setBytesLoaded(value:Number):void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Sets the number of bytes of data that have been loaded.
Parametri
value:Number |
Genera
ArgumentError — If value is negative, NaN, or greater than bytesTotal.
|
setBytesTotal | () | metodo |
protected final function setBytesTotal(value:Number):void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Sets the total size in bytes of the data being loaded.
Parametri
value:Number |
Genera
ArgumentError — If value is negative or smaller than bytesLoaded.
|
setLoadState | () | metodo |
unload | () | metodo |
public function unload():void
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Unloads this LoadTrait. Updates the load state.
Dispatches the loadStateChange
event with every state change.
Typical states are UNLOADING
while the media is unloading,
UNINITIALIZED
after it has successfully completed unloading,
and LOAD_ERROR
if it fails to complete unloading.
If the LoadState is not READY
when the
method is called, throws an error.
Genera
IllegalOperationError — If this trait is unable to unload
itself, or if the LoadState is not READY .
|
Elementi API correlati
bytesTotalChange | Evento |
org.osmf.events.LoadEvent
proprietà LoadEvent.type =
org.osmf.events.LoadEvent.BYTES_TOTAL_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Dispatched when total size in bytes of data being loaded has changed.
The LoadEvent.BYTES_TOTAL_CHANGE constant defines the value of the type property of the event object for a bytesTotalChange event.loadStateChange | Evento |
org.osmf.events.LoadEvent
proprietà LoadEvent.type =
org.osmf.events.LoadEvent.LOAD_STATE_CHANGE
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | OSMF 1.0 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
Dispatched when the state of the LoadTrait has changed.
The LoadEvent.LOAD_STATE_CHANGE constant defines the value of the type property of the event object for a loadStateChange event.Tue Jun 12 2018, 02:44 PM Z