3 Replies Latest reply on Aug 12, 2010 7:31 PM by Ned Murphy

    LoadVars

    JavaIsLife Level 1

      Hi Guys...

       

      I am new to Flash and actionscript. I have this fully functioning program with me that has a certain line of code that I am having a little difficulty figuring out. Here is how it goes:

       

      var initVar:LoadVars = new LoadVars( );

       

      I know what the above line does, as in a variable 'initVar' of type LoadVars is being decalred. It's a composite datatype and LoadVars is a class.

      However what I don't understand is what comes next:

       

      gBasicConnect = initVar.basicConnect;

       

      I was expecting basicConnect to be a method of the LoadVars class, unfortunately according to the AS2 API, it's not. Where could basicConnect have come from than? This is what I don't understand. I hope someone can help me in understanding this. Thanks guys..

        • 1. Re: LoadVars
          Ned Murphy Adobe Community Professional & MVP

          My guess is that gBasicConnect is just some variable that gets assigned the value held by initVar.basicConnect

          1 person found this helpful
          • 2. Re: LoadVars
            JavaIsLife Level 1

            Hi Ned Murphy..

             

            Thanks for responding, I appreciate it. Yup I guessed that, but my main concern was where 'basicConnect' was comming from since according to the API it's not a method of the 'LoadVars' class. Some kind souls from another forum have enlightened me that since the LoadVars class is a loader that can load external files, 'basicConnect' in all probabality is a name/value pair in an external file. True enough I have managed to find the external file and the name value pairs. I hope this information would be helpful to anyone else caught in a simillar situation as me. Thanks and regards.

            • 3. Re: LoadVars
              Ned Murphy Adobe Community Professional & MVP

              That's pretty much what I was telling you, though I didn't realize you didn't understand that LoadVars is a means for loading data/variables.