8 Replies Latest reply on Oct 18, 2010 1:27 PM by kglad

    Little AS2 challenging me with LoadVars

    Hisham Attia

      Hi there


      The code below used to work in CS2 (AS2), now I am using CS5 (AS2) and saved my CS2 file to CS5 format.

      For some reason when I updated the text file ("scara.txt") my loadVars is not loading the text into my dynamic textfield anymore.

      My only explanation is that something happened to the object on saving CS2 --> CS5. But what. The code below is quite straight forward and used to work. In fact, I have some other CS2 files that are doing exactly the same and they are working. I haven't updated them yet.


      Any ideas?




      These are my elements:

      Dynamic Textfield: loadedInfo

      External text file: scara.txt

      LoadVars Object: myPLV


      This is the code:

      var myPLV:LoadVars = new LoadVars();


      myPLV.onLoad = function(success) {

           if (success) {

                loadedInfo.htmlText = myPLV.info;

           } else {

                loadedInfo.text="ERROR in loading the information."