1 Reply Latest reply on Apr 20, 2008 3:38 PM by kglad

    Loading variables into flash

      Hi - I'm a bit of a newbie when it comes to actionscript and variables.
      I'm trying to get flash to show specific records from a php query depending on the querystring. In PHP I have:

      <? print("&var1=1&var2=2");?>

      In flash I successfully display var1 and var2 as dynamic text but getting flash to add them in the URL to retrieve other variables from is proving a challenge. If I replace " + var1 + " and " + var2 + " with 1 and 2 it works fine but of course ultimately I want these values to be dynamically retrieved.

      var myVars:LoadVars = new LoadVars();
      myVars.onLoad = function(ok){
      displayTxt1.text = myVars.var1;
      displayTxt2.text = myVars.var2;
      displayTxt1.text = "There was an error";
      displayTxt2.text = "There was an error";
      myVars.load("portfolio1.php?pageNum_photos=" + var1 + "&totalRows_photos=" + var2);

      Any help appreciated.