Here's some more context, I'm doing this for usling Flash XML
xmlLoader = newObject("XML")
setCallback(xmlLoader, "OnLoad", #LoadedXML, me)
xmlLoader.Load(fileName)
The problem is that the load function doesn't block and I can't loop
after the load function or file never loads and the callback never
happens.
On Thu, 10 Mar 2005 15:34:49 -0800, Lars Liden <[EMAIL PROTECTED]> wrote:
> I'm using "SetCallback" to get a callback from a Flash object in
> lingo, however, I'd like to block (i.e. wait) for the callback to be
> called before continuing execution of my lingo code.
>
> I'd like to do something like this:
>
> on Initialize()
> - do Flash thing (1) and wait for callback
> - do Flash thing (2) and wait for callback
> - do Flash thing (3) and wait for callback
> - do Flash thing (4) and wait for callback
> - do Flash thing (5) and wait for callback
> end
>
> Is there and easy way to do this? I've tried sitting in a repeat
> loop and checking a flag that's set in the callback funtion, but this
> prevents the callback from ever being called. (i.e.)
>
> - do Flash thing (1)
> - repeat while {callback flag not set}
>
> - do Flash thing (2)
>
> I don't really want to break my initialize method into a bunch of
> cascading callback functions.
>
> Thoughs?
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/lingo-l.cgi To post messages to the list, email
> [email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
> learning and helping with programming Lingo. Thanks!]
>
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]