0 Replies Latest reply on Sep 28, 2006 6:41 PM by wally_errrr

    URLLoader

    wally_errrr Level 1
      HI there,

      Just wondering if someone can give me some clues on what to do.

      I have a class that loads some text from files using the URLLoader class and the URLRequest class.

      I then have a method that performs operations on the loaded text. The problem i am having is that i don't know when i am able to call the methods that access the data, as if I instantiate the class and then call a method before the data is finished loading then it will fail.

      I was thinking of setting a flag inside the class that would be set once the last text has loaded, but I am not sure how to monitor that. I was thinking of sitting in a while loop until the flag is set, but this doesn't seem the most elegant way to go about it.

      I am not knowledgeable on design patterns, so is there a design pattern that would help me out here

      Any ideas?

      Cheers,

      Nathan