FYI - there is an easy work around (at least for the flash XML component.)
If you use the .load method it doesn't block so you have to use the callback. Instead, load the XML file into a text string then just parse if with the flash component (which does block). On Thu, 10 Mar 2005 16:12:22 -0800, Stephane Comeau <[EMAIL PROTECTED]> wrote: > Yep. You can't even loop in a flash function to wait for a callback in > another flash function. > > Steph > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of roymeo > > Sent: Thursday, March 10, 2005 4:02 PM > > To: Lingo programming discussion list > > Subject: Re: <lingo-l> How to wait for a callback.... > > > > I think you know what you need to do already....:) > > > > You're going to have to loop on a frame until everything is loaded and > > check fore each one. > > > > I think. > > > > roymeo > > > > At 06:55 PM 3/10/2005, you wrote: > > >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!] > > > > ----------- > > Roy Crisman > > Macromedia Director Programmer, Lingo Guru, Multimedia Producer > > 277 N. Goodman St. > > Rochester, NY 14607-1162 > > (585)473-3492 home > > (585)615-2873 cell > > http://www.brokenoffcarantenna.com/ > > roymeo(AT)brokenoffcarantenna.com > > > > [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!] > [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!]
