Paquete | org.osmf.traits |
Clase | public class LoadTrait |
Herencia | LoadTrait MediaTraitBase EventDispatcher Object |
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | OSMF 1.0 |
Versiones de motor de ejecución: | 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.
Elementos de API relacionados
Propiedad | Definido por | ||
---|---|---|---|
bytesLoaded : Number [solo lectura]
The number of bytes of data that have been loaded. | LoadTrait | ||
bytesTotal : Number [solo lectura]
The total size in bytes of the data being loaded. | LoadTrait | ||
constructor : Object
Una referencia a la clase de objeto o función constructora para una instancia de objeto determinada. | Object | ||
loadState : String [solo lectura]
The load state of this trait. | LoadTrait | ||
resource : MediaResourceBase [solo lectura]
Resource representing the piece of media to be loaded into
this LoadTrait. | LoadTrait | ||
traitType : String [solo lectura]
The MediaTraitType for this trait. | MediaTraitBase |
Método | Definido por | ||
---|---|---|---|
Constructor. | LoadTrait | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registra un objeto de detector de eventos con un objeto EventDispatcher, de modo que el detector reciba la notificación de un evento. | EventDispatcher | ||
Distribuye un evento en el flujo del evento. | EventDispatcher | ||
Disposes of any resources used by this trait. | MediaTraitBase | ||
Comprueba si el objeto EventDispatcher tiene detectores registrados para un tipo concreto de evento. | EventDispatcher | ||
Indica si un objeto tiene definida una propiedad especificada. | Object | ||
Indica si hay una instancia de la clase Object en la cadena de prototipo del objeto especificado como parámetro. | Object | ||
Loads this the media into this LoadTrait. | LoadTrait | ||
Indica si existe la propiedad especificada y si es enumerable. | Object | ||
Elimina un detector del objeto EventDispatcher. | EventDispatcher | ||
Establece la disponibilidad de una propiedad dinámica para operaciones de bucle. | Object | ||
Devuelve la representación de cadena de este objeto, con formato según las convenciones específicas de configuración regional. | Object | ||
Devuelve la representación de cadena del objeto especificado. | Object | ||
Unloads this LoadTrait. | LoadTrait | ||
Devuelve el valor simple del objeto especificado. | Object | ||
Comprueba si hay registrado un detector de eventos con este objeto EventDispatcher o con cualquiera de sus ascendientes para el tipo de evento concreto. | EventDispatcher |
Método | Definido por | ||
---|---|---|---|
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 | Resumen | Definido por | ||
---|---|---|---|---|
[evento broadcast] Se distribuye cuando Flash Player o AIR pasan a estar activos. | EventDispatcher | |||
Dispatched when total size in bytes of data being loaded has changed. | LoadTrait | |||
[evento broadcast] Se distribuye cuando Flash Player o de AIR pasan a estar inactivos. | EventDispatcher | |||
Dispatched when the state of the LoadTrait has changed. | LoadTrait |
bytesLoaded | propiedad |
bytesTotal | propiedad |
loadState | propiedad |
resource | propiedad |
resource:MediaResourceBase
[solo lectura] Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | OSMF 1.0 |
Versiones de motor de ejecución: | Flash Player 10, AIR 1.5 |
Resource representing the piece of media to be loaded into this LoadTrait.
Implementación
public function get resource():MediaResourceBase
LoadTrait | () | Información sobre |
public function LoadTrait(loader:LoaderBase, resource:MediaResourceBase)
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | OSMF 1.0 |
Versiones de motor de ejecución: | Flash Player 10, AIR 1.5 |
Constructor.
Parámetrosloader: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 | () | método |
protected function bytesLoadedChangeEnd():void
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | OSMF 1.0 |
Versiones de motor de ejecución: | Flash Player 10, AIR 1.5 |
Called just after the bytesLoaded
property has changed.
bytesLoadedChangeStart | () | método |
protected function bytesLoadedChangeStart(newValue:Number):void
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | OSMF 1.0 |
Versiones de motor de ejecución: | 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.
Parámetros
newValue:Number — New bytesLoaded value.
|
bytesTotalChangeEnd | () | método |
protected function bytesTotalChangeEnd():void
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | OSMF 1.0 |
Versiones de motor de ejecución: | 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 | () | método |
protected function bytesTotalChangeStart(newValue:Number):void
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | OSMF 1.0 |
Versiones de motor de ejecución: | 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.
Parámetros
newValue:Number — New bytesTotal value.
|
load | () | método |
public function load():void
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | OSMF 1.0 |
Versiones de motor de ejecución: | 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.
Emite
IllegalOperationError — If this trait is unable to load
itself or if the LoadState is LOADING or
READY .
|
Elementos de API relacionados
loadStateChangeEnd | () | método |
protected function loadStateChangeEnd():void
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | OSMF 1.0 |
Versiones de motor de ejecución: | Flash Player 10, AIR 1.5 |
Called just after the loadState
property is
change.
loadStateChangeStart | () | método |
protected function loadStateChangeStart(newState:String):void
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | OSMF 1.0 |
Versiones de motor de ejecución: | 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.
Parámetros
newState:String — New loadState value.
|
setBytesLoaded | () | método |
protected final function setBytesLoaded(value:Number):void
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | OSMF 1.0 |
Versiones de motor de ejecución: | Flash Player 10, AIR 1.5 |
Sets the number of bytes of data that have been loaded.
Parámetros
value:Number |
Emite
ArgumentError — If value is negative, NaN, or greater than bytesTotal.
|
setBytesTotal | () | método |
protected final function setBytesTotal(value:Number):void
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | OSMF 1.0 |
Versiones de motor de ejecución: | Flash Player 10, AIR 1.5 |
Sets the total size in bytes of the data being loaded.
Parámetros
value:Number |
Emite
ArgumentError — If value is negative or smaller than bytesLoaded.
|
setLoadState | () | método |
unload | () | método |
public function unload():void
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | OSMF 1.0 |
Versiones de motor de ejecución: | 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.
Emite
IllegalOperationError — If this trait is unable to unload
itself, or if the LoadState is not READY .
|
Elementos de API relacionados
bytesTotalChange | Evento |
org.osmf.events.LoadEvent
propiedad LoadEvent.type =
org.osmf.events.LoadEvent.BYTES_TOTAL_CHANGE
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | OSMF 1.0 |
Versiones de motor de ejecución: | 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
propiedad LoadEvent.type =
org.osmf.events.LoadEvent.LOAD_STATE_CHANGE
Versión del lenguaje: | ActionScript 3.0 |
Versión de producto: | OSMF 1.0 |
Versiones de motor de ejecución: | 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:12 PM Z