| Pakket | org.osmf.traits |
| Klasse | public class LoadTrait |
| Overerving | LoadTrait MediaTraitBase EventDispatcher Object |
| Taalversie: | ActionScript 3.0 |
| Productversie: | OSMF 1.0 |
| Runtimeversies: | 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.
Verwante API-elementen
| Eigenschap | Gedefinieerd door | ||
|---|---|---|---|
| bytesLoaded : Number [alleen-lezen]
The number of bytes of data that have been loaded. | LoadTrait | ||
| bytesTotal : Number [alleen-lezen]
The total size in bytes of the data being loaded. | LoadTrait | ||
![]() | constructor : Object
Verwijzing naar het klasseobject of de constructorfunctie van een bepaalde objectinstantie. | Object | |
| loadState : String [alleen-lezen]
The load state of this trait. | LoadTrait | ||
| resource : MediaResourceBase [alleen-lezen]
Resource representing the piece of media to be loaded into
this LoadTrait. | LoadTrait | ||
![]() | traitType : String [alleen-lezen]
The MediaTraitType for this trait. | MediaTraitBase | |
| Methode | Gedefinieerd door | ||
|---|---|---|---|
Constructor. | LoadTrait | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registreert een gebeurtenislistenerobject bij een object EventDispatcher, zodat de listener een melding van een gebeurtenis ontvangt. | EventDispatcher | |
![]() |
Verzendt een gebeurtenis naar de gebeurtenisstroom. | EventDispatcher | |
![]() |
Disposes of any resources used by this trait. | MediaTraitBase | |
![]() |
Controleert of het object EventDispatcher listeners heeft geregistreerd voor een specifiek type gebeurtenis. | EventDispatcher | |
![]() |
Geeft aan of voor een object een opgegeven eigenschap is gedefinieerd. | Object | |
![]() |
Geeft aan of een instantie van de klasse Object zich in de prototypeketen van het object bevindt dat als parameter is opgegeven. | Object | |
Loads this the media into this LoadTrait. | LoadTrait | ||
![]() |
Geeft aan of de opgegeven eigenschap bestaat en kan worden opgesomd. | Object | |
![]() |
Verwijdert een listener uit het object EventDispatcher. | EventDispatcher | |
![]() |
Stelt de beschikbaarheid van een dynamische eigenschap voor lusbewerkingen in. | Object | |
![]() |
Geeft de tekenreeksweergave van dit object weer, geformatteerd volgens de locatiespecifieke conventies. | Object | |
![]() |
Retourneert een tekenreeksrepresentatie van het opgegeven object. | Object | |
Unloads this LoadTrait. | LoadTrait | ||
![]() |
Retourneert de primitieve waarde van het opgegeven object. | Object | |
![]() |
Controleert of een gebeurtenislistener is geregistreerd bij dit object EventDispatcher of een van de voorouders voor het opgegeven type gebeurtenis. | EventDispatcher | |
| Methode | Gedefinieerd door | ||
|---|---|---|---|
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 | ||
| Gebeurtenis | Overzicht | Gedefinieerd door | ||
|---|---|---|---|---|
![]() | [uitgezonden gebeurtenis] Wordt verzonden wanneer Flash Player of de AIR-toepassing de besturingssysteemfocus krijgt en actief wordt. | EventDispatcher | ||
| Dispatched when total size in bytes of data being loaded has changed. | LoadTrait | |||
![]() | [uitgezonden gebeurtenis] Wordt verzonden wanneer Flash Player of de AIR-toepassing de systeemfocus verliest en inactief wordt. | EventDispatcher | ||
| Dispatched when the state of the LoadTrait has changed. | LoadTrait | |||
bytesLoaded | eigenschap |
bytesTotal | eigenschap |
loadState | eigenschap |
resource | eigenschap |
resource:MediaResourceBase [alleen-lezen] | Taalversie: | ActionScript 3.0 |
| Productversie: | OSMF 1.0 |
| Runtimeversies: | Flash Player 10, AIR 1.5 |
Resource representing the piece of media to be loaded into this LoadTrait.
Implementatie
public function get resource():MediaResourceBaseLoadTrait | () | Constructor |
public function LoadTrait(loader:LoaderBase, resource:MediaResourceBase)| Taalversie: | ActionScript 3.0 |
| Productversie: | OSMF 1.0 |
| Runtimeversies: | Flash Player 10, AIR 1.5 |
Constructor.
Parametersloader: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 | () | methode |
protected function bytesLoadedChangeEnd():void| Taalversie: | ActionScript 3.0 |
| Productversie: | OSMF 1.0 |
| Runtimeversies: | Flash Player 10, AIR 1.5 |
Called just after the bytesLoaded property has changed.
bytesLoadedChangeStart | () | methode |
protected function bytesLoadedChangeStart(newValue:Number):void| Taalversie: | ActionScript 3.0 |
| Productversie: | OSMF 1.0 |
| Runtimeversies: | 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.
Parameters
newValue:Number — New bytesLoaded value.
|
bytesTotalChangeEnd | () | methode |
protected function bytesTotalChangeEnd():void| Taalversie: | ActionScript 3.0 |
| Productversie: | OSMF 1.0 |
| Runtimeversies: | 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 | () | methode |
protected function bytesTotalChangeStart(newValue:Number):void| Taalversie: | ActionScript 3.0 |
| Productversie: | OSMF 1.0 |
| Runtimeversies: | 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.
Parameters
newValue:Number — New bytesTotal value.
|
load | () | methode |
public function load():void| Taalversie: | ActionScript 3.0 |
| Productversie: | OSMF 1.0 |
| Runtimeversies: | 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.
Gegenereerde uitzondering
IllegalOperationError — If this trait is unable to load
itself or if the LoadState is LOADING or
READY.
|
Verwante API-elementen
loadStateChangeEnd | () | methode |
protected function loadStateChangeEnd():void| Taalversie: | ActionScript 3.0 |
| Productversie: | OSMF 1.0 |
| Runtimeversies: | Flash Player 10, AIR 1.5 |
Called just after the loadState property is
change.
loadStateChangeStart | () | methode |
protected function loadStateChangeStart(newState:String):void| Taalversie: | ActionScript 3.0 |
| Productversie: | OSMF 1.0 |
| Runtimeversies: | 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.
Parameters
newState:String — New loadState value.
|
setBytesLoaded | () | methode |
protected final function setBytesLoaded(value:Number):void| Taalversie: | ActionScript 3.0 |
| Productversie: | OSMF 1.0 |
| Runtimeversies: | Flash Player 10, AIR 1.5 |
Sets the number of bytes of data that have been loaded.
Parameters
value:Number |
Gegenereerde uitzondering
ArgumentError — If value is negative, NaN, or greater than bytesTotal.
|
setBytesTotal | () | methode |
protected final function setBytesTotal(value:Number):void| Taalversie: | ActionScript 3.0 |
| Productversie: | OSMF 1.0 |
| Runtimeversies: | Flash Player 10, AIR 1.5 |
Sets the total size in bytes of the data being loaded.
Parameters
value:Number |
Gegenereerde uitzondering
ArgumentError — If value is negative or smaller than bytesLoaded.
|
setLoadState | () | methode |
unload | () | methode |
public function unload():void| Taalversie: | ActionScript 3.0 |
| Productversie: | OSMF 1.0 |
| Runtimeversies: | 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.
Gegenereerde uitzondering
IllegalOperationError — If this trait is unable to unload
itself, or if the LoadState is not READY.
|
Verwante API-elementen
bytesTotalChange | Gebeurtenis |
org.osmf.events.LoadEventeigenschap LoadEvent.type =
org.osmf.events.LoadEvent.BYTES_TOTAL_CHANGE| Taalversie: | ActionScript 3.0 |
| Productversie: | OSMF 1.0 |
| Runtimeversies: | 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 | Gebeurtenis |
org.osmf.events.LoadEventeigenschap LoadEvent.type =
org.osmf.events.LoadEvent.LOAD_STATE_CHANGE| Taalversie: | ActionScript 3.0 |
| Productversie: | OSMF 1.0 |
| Runtimeversies: | 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.Wed Jun 13 2018, 11:42 AM Z
Overerfde openbare eigenschappen verbergen
Overerfde openbare eigenschappen weergeven