8 Replies Latest reply on Dec 15, 2009 10:44 AM by ForestDemon

    Waiting for an event to finish before continuing. (callback maybe)


      i have a few scenarios where i need to wait for an event to finish so i can access other data. both invlove reading data from disk either through a urlloaded or a filestream.


      the problem is that after i call a function that loads the data, i have another function that wants to work with the data being retrieved before writing it back to disk, but the function that loads the data doesn't wait until the data is loaded...therefore the data isn't there to be worked with/modified, etc...


      is a callback function needed or how can this be accomplished.


      if someone could point me to a good link or example, i'd much appreciate it.