Cerberus X Documentation

Module mojo.asyncloaders

The Mojo async loaders module provides functions and interfaces for loading images and sounds asynchronously. More...

Declarations

Imports
brl.asyncevent The asyncevent module provides core functionality for handling asynchronous (async) events.
Imported By
mojo
Please note that only documented modules are listed here, there might be undocumented modules that import this one.
Interfaces
IOnLoadImageComplete
IOnLoadSoundComplete
Functions
LoadImageAsync : Void ( path:String, frames:Int=1, flags:Int=Image.DefaultFlags, onComplete:IOnLoadImageComplete ) Begins loading an image asynchronously.
LoadSoundAsync : Void ( path:String, onComplete:IOnLoadSoundComplete ) Begins loading a sound asynchronously.

Detailed Discussion

The Mojo async loaders module provides functions and interfaces for loading images and sounds asynchronously.


Functions Documentation

Function LoadImageAsync : Void ( path:String, frames:Int=1, flags:Int=Image.DefaultFlags, onComplete:IOnLoadImageComplete )

Begins loading an image asynchronously.

Once the image has loaded, the OnLoadImageComplete method of the specified onComplete object will be invoked.

Note: When using asynchronous features, your app must continually call the UpdateAsyncEvents function to process async events. This can be done be calling UpdateAsyncEvents once per OnUpdate.

Function LoadSoundAsync : Void ( path:String, onComplete:IOnLoadSoundComplete )

Begins loading a sound asynchronously.

Once the sound has loaded, the OnLoadSoundComplete method of the onComplete object will be invoked.

Note: When using asynchronous features, your app must continually call the UpdateAsyncEvents function to process async events. This can be done be calling UpdateAsyncEvents once per OnUpdate.