1 Reply Latest reply on Jun 27, 2009 3:32 PM by Ned Murphy

    LoadVars for multiple files to load

    Oskario1
      Hi, I have a conflict of loading files with LoadVars and urgently I need a solution. My problem is that I load multiple files and the order in which call Load () does not match the order that runs onData (). I put the code below to see if I understood better.

       

      This is a loop within which the number of iterations not know at the begining:

       

      Data.$my_lv [i] = new LoadVars ();
      Data.$my_lv [i]. Load ( "file i");

       


      Data.$my_lv [i]. Ondata = function (RawData)
      (
      / / here, I need to know over what file I am doing the Ondata to load properly in my data structure
      )

       


      The quick answer would be to say that I use the variable i, but the problem is that this loop is executed completely and then begin to receive the unsorted Ondata () . The value of i is the completion of the loop and not the value when I had the calling Ondata ().

       

      I hope to have explained, because it is a bit complex and my englih is limitated.

       

      I appreciate any suggestions!