Say I have two functions load() and handleComplete(event:Event). Right
now to get custom data to handleComplete I do something like this
private var someFlag:uint = 0;
function load() {
loader.addEventListener(handleComplete);
someFlag = determineFlag();
loader.loadSomeStuff();
}
function handleComplete(event:Event) {
trace(someFlag);
}
But if I call this super fast, someFlag is gonna be wrong. I've seen a
method where you can add an anonymous function somehow, but I'm pretty
sure that even faced the same race condition problem. What is the
*proper* way to go about this?