# Questions on "Loading Text from External Sources" Tutorial

**URL:** <https://forum.kirupa.com/t/questions-on-loading-text-from-external-sources-tutorial/177965>\
**Category:** flash\
**Created:** [February 6, 2006, 8:11pm UTC](https://forum.kirupa.com/t/questions-on-loading-text-from-external-sources-tutorial/177965 "2006-02-06T20:11:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aswhitehead](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@aswhitehead](https://forum.kirupa.com/u/aswhitehead)\
**Post date:** [February 6, 2006, 8:11pm UTC](https://forum.kirupa.com/t/questions-on-loading-text-from-external-sources-tutorial/177965/1 "2006-02-06T20:11:23Z")

</div>

Hi! I have been playing around with the tutorial “Loading Text from External Sources” by Chris99022. The project I am working on is a real estate site and I am wanting to display data in a dynamic text box about each lot when they are clicked on. I want to be able to update the information via txt file.

First I modified his code to pull all the variables from 1 txt file. It would defeat my purpose to have 100 different txt files on the server that you have to go through. So now each button pulls 1 variable from the same txt file.

Question 1: How can I modify the code to pull multiple variables into the txt area when one button is pushed. For example, when lot 1 is clicked, it would pull in a variable with the lot name, a variable with the description, and a variable with the sold/not sold status. Here is the current code pulling one variable:

```auto
on (release) {
 loadText = new loadVars();
 loadText.load("text1.txt");
 loadText.onLoad = function(success) {
  if (success) {
   // trace(success);
   newsBox.html = true;
   newsBox.htmlText = this.myNews;
  }
 };
}

```

Question 2: I thought about just using a naming convention in the txt file like this:

```auto

1number=Lot 1
&1desc=blah,blah,blah
&1status=sold
 
&2number=Lot 2
&2desc=blah,blah,bleep
&2status=

```

etc… but I was wondering if there was a way to do something like this (I know the code won’t work but just the hierarchy):

```auto

Lot1
     number=Lot 1
     desc=blah,blah,blah
     status=sold
End Lot1
Lot2
     number=Lot 2
     desc=blah,blah,blah
     status=
End Lot2

```

If there is not a way to use hierarchy in a txt file or xml then I could just use line returns in the txt file to separate sections and is their a way to REM out lines in the text file that could be descriptive to the user but ignored by Flash?

Question 3: Is there a way to dynamically load jpg’s with a text file where a variable is the path to the jpg on the server and it would load into the texxt area with the other variables?

Thanks,  
Scott Whitehead
