# Trouble loading external text...argggg!

**URL:** https://forum.kirupa.com/t/trouble-loading-external-text-argggg/174701
**Category:** flash
**Created:** [January 8, 2006, 7:07am UTC](https://forum.kirupa.com/t/trouble-loading-external-text-argggg/174701 "2006-01-08T07:07:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![VestanPance](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/vestanpance/32/2059_2.png) [@VestanPance](https://forum.kirupa.com/u/VestanPance)
#### Post date: [January 8, 2006, 7:07am UTC](https://forum.kirupa.com/t/trouble-loading-external-text-argggg/174701/1 "2006-01-08T07:07:42Z")

</div>

Greetings,

```
  I am having troubles loading a varibale containing some text from an external .txt file. Here is the code:

```

```auto
function changeText(whichOne) {
        lv = new LoadVars();
        lv.load("files/map_log.txt");
        lv.onLoad = function(ok) {
                if (ok) {
            sootIntro.htmlText = this.whichOne;
        };
    };
};

ba.onRollOver = function() {
       changeText(this._name);
     };

```

This is loading from the text file “map\_log.txt” this text:

```auto
&ba=<span class='header'>b1</span><br /><br /><p class='body'>While the effect of human activity on the global climate is hotly debated, physical signs of environmental change are all around us.</span></p>

```

This code does work correctly when I hard code “sootIntro.htmlText = this.ba;” but it only displays “undefined” when I don’t. Any ideas on this one?

Thanks a ton for your time!
