Paket | org.osmf.traits |
Klass | public class LoaderBase |
Arv | LoaderBase EventDispatcher Object |
Underklasser | F4MLoader, ImageLoader, ManifestLoaderBase, NetLoader, SoundLoader, SWFLoader |
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
A MediaElement that has the LoadTrait uses a LoaderBase to perform the actual load operation. This decoupling of the loading and unloading from the media allows a MediaElement to use different loaders for different circumstances.
Metod | Definieras med | ||
---|---|---|---|
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 | ||
Indicates whether this loader is capable of handling (loading)
the given MediaResourceBase. | LoaderBase | ||
Skickar en händelse till händelseflödet. | EventDispatcher | ||
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 the specified LoadTrait. | LoaderBase | ||
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 the specified LoadTrait. | LoaderBase | ||
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 | ||
---|---|---|---|
Executes the load of the given LoadTrait. | LoaderBase | ||
Executes the unload of the given LoadTrait. | LoaderBase | ||
Updates the given LoadTrait with the given info, and dispatches the
state change event if necessary. | LoaderBase |
Händelse | Sammanfattning | Definieras med | ||
---|---|---|---|---|
[utsändningshändelse] Skickas när Flash Player eller AIR får operativsystemfokus och blir aktivt. | EventDispatcher | |||
[utsändningshändelse] Skickas när Flash Player eller AIR förlorar operativsystemfokus och blir inaktivt. | EventDispatcher | |||
Dispatched when the state of a LoadTrait being loaded or unloaded by the LoaderBase has changed. | LoaderBase |
canHandleResource | () | metod |
public function canHandleResource(resource:MediaResourceBase):Boolean
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Indicates whether this loader is capable of handling (loading) the given MediaResourceBase.
Parametrar
resource:MediaResourceBase — The media resource in question.
|
Boolean — True if this loader can handle the given resource.
|
executeLoad | () | metod |
protected function executeLoad(loadTrait:org.osmf.traits:LoadTrait):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Executes the load of the given LoadTrait.
This method is invoked by load()
.
Subclasses should override this method to provide their
own implementation of the load operation.
Parametrar
loadTrait:org.osmf.traits:LoadTrait |
executeUnload | () | metod |
protected function executeUnload(loadTrait:org.osmf.traits:LoadTrait):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Executes the unload of the given LoadTrait.
This method is invoked by unload()
.
Subclasses should override this method to provide their
own implementation of the unload operation.
Parametrar
loadTrait:org.osmf.traits:LoadTrait |
load | () | metod |
public final function load(loadTrait:org.osmf.traits:LoadTrait):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Loads the specified LoadTrait. Changes the load state of the LoadTrait.
Dispatches the loadStateChange
event with every state change.
Typical states are LOADING
while the LoadTrait is loading,
READY
after it has successfully completed loading,
and LOAD_ERROR
if it fails to complete loading.
If the LoadTrait's LoadState is LOADING
or
READY
when the method is called, this method throws
an error.
Subclasses should override the executeLoad
method to perform
the actual load operation.
Parametrar
loadTrait:org.osmf.traits:LoadTrait — The LoadTrait to load.
|
Utlöser
IllegalOperationError — IllegalOperationError
If this loader cannot load the given LoadTrait (as determined by
the canHandleResource() method),
or if the LoadTrait's LoadState is LOADING or
READY .
|
Relaterade API-element
unload | () | metod |
public final function unload(loadTrait:org.osmf.traits:LoadTrait):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Unloads the specified LoadTrait. Changes the load state of the LoadTrait.
Dispatches the loaderStateChange
event with every state change.
Typical states are UNLOADING
while the LoadTrait is unloading,
UNINITIALIZED
after it has successfully completed unloading,
and LOAD_ERROR
if it fails to complete unloading.
If the LoadTrait's LoadState is not READY
when the method
is called, this method throws an error.
Subclasses should override the executeUnload
method to perform
the actual unload operation.
Parametrar
loadTrait:org.osmf.traits:LoadTrait — The LoadTrait to unload.
|
Utlöser
IllegalOperationError — IllegalOperationError
If this loader cannot unload the specified LoadTrait (as determined by
the canHandleResource() method),
or if the LoadTrait's LoadState is not READY .
|
Relaterade API-element
updateLoadTrait | () | metod |
protected final function updateLoadTrait(loadTrait:org.osmf.traits:LoadTrait, newState:String):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Updates the given LoadTrait with the given info, and dispatches the state change event if necessary.
Parametrar
loadTrait:org.osmf.traits:LoadTrait — The LoadTrait to update.
| |
newState:String — The new LoadState of the LoadTrait.
|
loadStateChange | Händelse |
org.osmf.events.LoaderEvent
egenskap LoaderEvent.type =
org.osmf.events.LoaderEvent.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 a LoadTrait being loaded or unloaded by the LoaderBase has changed.
The LoaderEvent.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