does determineFlag() do some asynch service call? If so you need to wait and
raise an event or update a var in a model and listen for changes that way.
Otherwise your determineFlag() method will run to completion before the
loader.loadSomeStuff() line is executed, Flash is single threaded for user
code execution so you shouldn't have a race condition there
On Mon, Jun 9, 2008 at 3:55 PM, robbarreca <[EMAIL PROTECTED]>
wrote:
> 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?
>
>
>