7 Replies Latest reply on May 27, 2007 1:33 PM by kglad

    Time until next Event loop

      I'm making a class that will load some data, and fire an event when it's finished loading... and I'm just not sure how to set it up so that people won't miss the event trigger when it's asked to load an extremely small amount of data.

      My first version started the load in the constructor, but I'm worried it will finish loading before execution returns to the next line of actionscript, i.e. before the user can assign an event listener for the 'complete' event, in which case the event handler will never be called.... however, there are examples in the flash docs that function exactly like that, so maybe I'm misunderstanding?

      Do all events wait until all functions have finished running before firing? Or should objects that risk firing events extremely soon after their construction be used in such a way to manually check if any events were missed on the way to assigning the handler?