5 Replies Latest reply on May 3, 2010 10:13 PM by kglad

    loadVariables to load variables

    albatros1064

      A set of scripts was developed in pre-MX env and worked fine. In part, some used loadVariables(url, target,method) action to receive a response from that URL and load variables in the target (sorry for the tautology >))

      A typical response from the URL would be

      "var1=value1\&var2=value2"  string  preceded by a pseudoheader (a must!)  newline "\n"

       

      That response would set _root.var1 to value1 etc in the clip root, for example.

       

      In Player9 (and may be even earlier) it stopped working. The player does NOT, evidently, parse the response to set variables as instructed.

       

      Any thought or idea, please?

       

       

       

       

       

      A

        • 1. Re: loadVariables to load variables
          kglad Adobe Community Professional & MVP

          there were no changes in the say loadVariables worked in pre-mx and latter (even fp 9) fp versions.  the major changes that would affect your code were:

           

          1.  case counts after flash-mx

          2.  variables not intialized, are undefined after flash-mx

          • 2. Re: loadVariables to load variables
            albatros1064 Level 1

            --- kglad ))

            • 4. Re: loadVariables to load variables
              albatros1064 Level 1

              Adobe sent me your comment by email offering to simply 'Reply' which I did, but now I am not sure you had got it.

              In short,  the typing case is not changed since the ggod days' when it all worked, the vars are init'ed.

              I tried several versions of identifying the second arg ('target') in loadVariables like _root, _level0, 0) all to no avail.

              Does Player8+ want an HTTP header of a kind? I tried several variants, no change.

              I feel the clip does receive the message from the backend (where would the message get lost?) , yet the parsing is not as intended and as it used to be.

              Thus, it does not assign new values to the clip vars properly.

              • 5. Re: loadVariables to load variables
                kglad Adobe Community Professional & MVP

                no paths changed from fp6 to fp10.

                 

                but, by case counting after fp6 i meant, in fp6:

                 

                yourVar was the same as yourvar.  but after fp6, those two are different.  you should check for typo's in everything related to the variables you're loading and all the objects (like textfields etc) that use those variables.

                 

                there's another change that's been signicant since fp 9 and that's related to security issues.   fp9 is much more security conscience than earlier versions.

                 

                so, if you're doing any cross-domain work (or you're testing locally), you probably are encountering cross-domain issues.

                 

                if the above doesn't help you pinpoint and solve the issue(s), post the code you use to load and use those variables.