Package | impression.simulation |
Interface | public interface ISnapshotLoader extends flash.events.IEventDispatcher |
A snapshot
is defined as an external file that contains data specifying a specific simulation state. In some
cases, supporting snapshot capabilities can improve the time it takes to set the simulation for a specific storyboard, particularly
when compared to sequencing. Snapshots can also be reused, improving the efficiency of the content development process. Note that
the data format of this file, the methodology used by an implementer to process the snapshot, and any functionality provided by
the simulation to support processing snapshots, is simulation-specific. Although it is possible to build a "generic"
snapshot loader that can work with simulation objects that implement one of the ISnapshot[String,XML]Reader interfaces, typical
ISnapshotLoader implementations are created for a specific simulation.
Method | Defined By | ||
---|---|---|---|
cancel():void
Cancels any snapshot processing currently in progress. | ISnapshotLoader | ||
loadSnapshot(simulation:ISimulation, snapshot:AssetData, resolver:AssetResolver, resolverOwner:*):void
Loads the simulation with the snapshot data. | ISnapshotLoader |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatch when snapshot processing has completed. | ISnapshotLoader | |||
Dispatch when an error occurs. | ISnapshotLoader |
cancel | () | method |
public function cancel():void
Cancels any snapshot processing currently in progress.
loadSnapshot | () | method |
public function loadSnapshot(simulation:ISimulation, snapshot:AssetData, resolver:AssetResolver, resolverOwner:*):void
Loads the simulation with the snapshot data. Implementers must dispatch the SimulationObjectEvent.INITIALIZATION_COMPLETE
event when snapshot processing has completed.
Parameters
simulation:ISimulation — The simulation to load with snapshot data.
| |
snapshot:AssetData — The snapshot file to load.
| |
resolver:AssetResolver — The AssetResolver to use to load the snapshot file.
| |
resolverOwner:* — The owner to use when loading the snapshot file.
|
initializationComplete | Event |
impression.events.SimulationObjectEvent
impression.events.SimulationObjectEvent.INITIALIZATION_COMPLETE
Dispatch when snapshot processing has completed.
The SimulationObjectEvent.INITIALIZATION_COMPLETE constant defines the value of the type property of a simulation object initialization complete event object. This event has the following properties:Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | The object that raised the event. |
simulationObjectError | Event |
impression.events.SimulationObjectErrorEvent
impression.events.SimulationPlayerErrorEvent.ERROR
Dispatch when an error occurs.
The SimulationPlayerErrorEvent.ERROR constant defines the value of the type property of an error event object. This event has the following properties:Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | The object that raised the event. |
sb | The Storyboard object assigned to the target. |
loading | Indicates whether or not the event occurred during the loading phase of the storyboard. |
message | The message associated with the error. |
errorData | Additional data associated with the error. |
source | The type of object that initially raised the error. |