0 Replies Latest reply on Apr 28, 2007 4:20 AM by coffee_cat

    loadVars using a stored string....

    coffee_cat
      Hi All,

      I'm trying to open an external text file by passing a parameter to the loadVars object rather than specifying a string in the loadVars object. I've probably writtne this totally wrong, what I'm trying to do is (simplified):

      var shopDetails_str:String = new String();
      {
      var shopDetails_str:String = shopdetails;
      }

      myData = new LoadVars();
      myData.onLoad = function()
      {
      details.details_txt.text = this.shopDetails_str;
      }

      myData.load("text/"+shopDetails_str+".txt");

      is it possible to do this rather than

      myData.load("text/butchers.txt");

      This particular code isn't working, so firstly is it possible to do something like this and secondly if it is how do i go about doing it?!!!

      please help, it's driving me bonkers!!!

      CC