Module mojo.asyncloaders - leonard-thieu/monkey GitHub Wiki

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

Imports

Interfaces

Functions

Detailed Discussion

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

Function Documentation

Function LoadImageAsync : Void ( path:String, frames:Int, flags:Int, 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.

⚠️ **GitHub.com Fallback** ⚠️