4 Replies Latest reply on May 12, 2006 12:53 PM by Rothrock

    Help - Setting & Reading In Text Variables

    wwwedwardjonesdesign
      Hello, can anyone tell me why my dynamic text box, instance name = "body_txt", displays the undefined? I have a .txt file with variables, &law1, &law2, etc... I want to set my variable "body_text_var" from buttons and only show the specific text variable content, i.e. &law1.

      I think this should be working but is not.... Thanks, Ed
      /////////////////
      stop();
      var body_text_var:String;
      if (body_text_var == undefined) {
      body_text_var = "law1";
      }
      //// director text
      fileData = new LoadVars();
      fileData.onLoad = function(success) {
      if (success) {
      trace("Loading History Data OK!");
      //// history text
      body_txt.htmlText = fileData.body_text_var;
      trace(body_text_var);
      } else {
      trace("Loading History Error!");
      }
      };
      fileData.load("timeline/law.txt");