class flixel.addons.util.FlxAsyncLoop extends FlxBasic

Available on all platforms

Special class for asynchonously performing a loop. * @author Timothy Ian Hely / SeiferTim

Instance Fields

function new(Iterations:Int, Callback:Void ->Void, ?IterationsPerUpdate:Int = 100):Void

Creates an instance of the FlxAsyncLoop class, used to do a loop while still allowing update() to get called and the screen to refresh. * *

Iterations

How many total times should it loop *

Callback

The function that should be called each loop *

IterationsPerUpdate

Optional: how many loops before we allow an update() - defaults to 100.

function destroy():Void

function start():Void

Start the loop (if it's not already started or finished)

function update():Void