# Loading multiple txt variables into one dynamic textfield?

**URL:** <https://forum.kirupa.com/t/loading-multiple-txt-variables-into-one-dynamic-textfield/278549>\
**Category:** flash\
**Created:** [January 1, 2009, 5:17pm UTC](https://forum.kirupa.com/t/loading-multiple-txt-variables-into-one-dynamic-textfield/278549 "2009-01-01T17:17:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![slackulator](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@slackulator](https://forum.kirupa.com/u/slackulator)\
**Post date:** [January 1, 2009, 5:17pm UTC](https://forum.kirupa.com/t/loading-multiple-txt-variables-into-one-dynamic-textfield/278549/1 "2009-01-01T17:17:53Z")

</div>

Hello everyone and happy new year.

I was wondering if I can point to a variable of a .txt file.  
My .txt file has four variables:

[LIST]  
[_]&main= text here&  
[_]&title = title here&  
[_]&main2= text2 here&  
[_]&title2 = title2 here&  
[/LIST]

I load the first Variable on my dynamic textfield successfully.What I want to do now is, to display the second variable on the same dynamic textfield when button “next” is clicked.

Actually I am using this code: (where “[COLOR=Blue]main[/COLOR]” is the first text variable and “[COLOR=Blue]title[/COLOR]” the second one).

```auto
var myLoadVars:LoadVars = new LoadVars;
myLoadVars.load("mytext.txt");
myLoadVars.onLoad = function (success:Boolean){
    if(success){
    my_txt.html = true;
    my_txt.htmlText = this.[COLOR=blue]main[/COLOR];
    title_txt.html = true;
    title_txt.htmlText = this.[COLOR=blue]title[/COLOR];
    }
};

```

Any ideas?:cowboy:
