Paket | org.osmf.traits |
Klass | public class LoadTrait |
Arv | LoadTrait MediaTraitBase EventDispatcher Object |
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | 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.
Relaterade API-element
Egenskap | Definieras med | ||
---|---|---|---|
bytesLoaded : Number [skrivskyddad]
The number of bytes of data that have been loaded. | LoadTrait | ||
bytesTotal : Number [skrivskyddad]
The total size in bytes of the data being loaded. | LoadTrait | ||
constructor : Object
En referens till klassobjektet eller konstruktorfunktionen för en given objektinstans. | Object | ||
loadState : String [skrivskyddad]
The load state of this trait. | LoadTrait | ||
resource : MediaResourceBase [skrivskyddad]
Resource representing the piece of media to be loaded into
this LoadTrait. | LoadTrait | ||
traitType : String [skrivskyddad]
The MediaTraitType for this trait. | MediaTraitBase |
Metod | Definieras med | ||
---|---|---|---|
Constructor. | LoadTrait | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registrerar ett händelseavlyssnarobjekt för ett EventDispatcher-objekt så att avlyssnaren får meddelanden om händelser. | EventDispatcher | ||
Skickar en händelse till händelseflödet. | EventDispatcher | ||
Disposes of any resources used by this trait. | MediaTraitBase | ||
Kontrollerar om EventDispatcher-objektet har några avlyssnare registrerade för en viss typ av händelse. | EventDispatcher | ||
Anger om det finns en egenskap angiven för ett objekt. | Object | ||
Anger om en instans av klassen Object finns i prototypkedjan för objektet som anges som parameter. | Object | ||
Loads this the media into this LoadTrait. | LoadTrait | ||
Anger om den angivna egenskapen finns och är uppräkningsbar. | Object | ||
Tar bort en avlyssnare från EventDispatcher-objektet. | EventDispatcher | ||
Anger tillgänglighet för en dynamisk egenskap för slingåtgärder. | Object | ||
Returnerar det här objektets strängrepresentation, formaterad i enlighet med språkspecifika konventioner. | Object | ||
Returnerar det angivna objektets strängbeteckning. | Object | ||
Unloads this LoadTrait. | LoadTrait | ||
Returnerar det angivna objektets primitiva värde. | Object | ||
Kontrollerar om en händelseavlyssnare är registrerad för det här EventDispatcher-objektet eller något av dess överordnade objekt för den angivna händelsetypen. | EventDispatcher |
Metod | Definieras med | ||
---|---|---|---|
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 |
Händelse | Sammanfattning | Definieras med | ||
---|---|---|---|---|
[utsändningshändelse] Skickas när Flash Player eller AIR får operativsystemfokus och blir aktivt. | EventDispatcher | |||
Dispatched when total size in bytes of data being loaded has changed. | LoadTrait | |||
[utsändningshändelse] Skickas när Flash Player eller AIR förlorar operativsystemfokus och blir inaktivt. | EventDispatcher | |||
Dispatched when the state of the LoadTrait has changed. | LoadTrait |
bytesLoaded | egenskap |
bytesTotal | egenskap |
loadState | egenskap |
resource | egenskap |
resource:MediaResourceBase
[skrivskyddad] Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Resource representing the piece of media to be loaded into this LoadTrait.
Implementering
public function get resource():MediaResourceBase
LoadTrait | () | Konstruktor |
public function LoadTrait(loader:LoaderBase, resource:MediaResourceBase)
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Constructor.
Parametrarloader: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 | () | metod |
protected function bytesLoadedChangeEnd():void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Called just after the bytesLoaded
property has changed.
bytesLoadedChangeStart | () | metod |
protected function bytesLoadedChangeStart(newValue:Number):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | 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.
Parametrar
newValue:Number — New bytesLoaded value.
|
bytesTotalChangeEnd | () | metod |
protected function bytesTotalChangeEnd():void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | 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 | () | metod |
protected function bytesTotalChangeStart(newValue:Number):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | 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.
Parametrar
newValue:Number — New bytesTotal value.
|
load | () | metod |
public function load():void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | 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.
Utlöser
IllegalOperationError — If this trait is unable to load
itself or if the LoadState is LOADING or
READY .
|
Relaterade API-element
loadStateChangeEnd | () | metod |
protected function loadStateChangeEnd():void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Called just after the loadState
property is
change.
loadStateChangeStart | () | metod |
protected function loadStateChangeStart(newState:String):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | 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.
Parametrar
newState:String — New loadState value.
|
setBytesLoaded | () | metod |
protected final function setBytesLoaded(value:Number):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Sets the number of bytes of data that have been loaded.
Parametrar
value:Number |
Utlöser
ArgumentError — If value is negative, NaN, or greater than bytesTotal.
|
setBytesTotal | () | metod |
protected final function setBytesTotal(value:Number):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Sets the total size in bytes of the data being loaded.
Parametrar
value:Number |
Utlöser
ArgumentError — If value is negative or smaller than bytesLoaded.
|
setLoadState | () | metod |
unload | () | metod |
public function unload():void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | 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.
Utlöser
IllegalOperationError — If this trait is unable to unload
itself, or if the LoadState is not READY .
|
Relaterade API-element
bytesTotalChange | Händelse |
org.osmf.events.LoadEvent
egenskap LoadEvent.type =
org.osmf.events.LoadEvent.BYTES_TOTAL_CHANGE
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | 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 | Händelse |
org.osmf.events.LoadEvent
egenskap LoadEvent.type =
org.osmf.events.LoadEvent.LOAD_STATE_CHANGE
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | 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, 01:40 PM Z