Module mojo.asyncloaders

Информация

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

Функции

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.