# LoadVars: Multiple text boxes, multiple text files

**URL:** <https://forum.kirupa.com/t/loadvars-multiple-text-boxes-multiple-text-files/195750>\
**Category:** Uncategorized\
**Created:** [August 2, 2006, 8:48pm UTC](https://forum.kirupa.com/t/loadvars-multiple-text-boxes-multiple-text-files/195750 "2006-08-02T20:48:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![takethetrain](https://avatars.discourse-cdn.com/v4/letter/t/ba8739/32.png) [@takethetrain](https://forum.kirupa.com/u/takethetrain)\
**Post date:** [August 2, 2006, 8:48pm UTC](https://forum.kirupa.com/t/loadvars-multiple-text-boxes-multiple-text-files/195750/1 "2006-08-02T20:48:27Z")

</div>

Is it possible to use one LoadVars object to load different text files into different text boxes?

I know I can do this:

```auto

var textLoader:LoadVars = new LoadVars();
    textLoader.onData = function(content) {
        trace("Data loaded successfully.");
        someBox.text = content;
    };
button1.onRelease = function() {
    textLoader.load("file.txt");
}
button2.onRelease = function() {
    textLoader.load("file2.txt");
}

```

I know this will load two different text files into the same text field, but I want to be able to define different boxes, like maybe

```auto

textLoader.load("file.txt", someBox.text);

```

though that is obviously not correct.

Any ideas?
