# Changing text files for flash to use

**URL:** https://forum.kirupa.com/t/changing-text-files-for-flash-to-use/109804
**Category:** Uncategorized
**Created:** [May 9, 2004, 5:04pm UTC](https://forum.kirupa.com/t/changing-text-files-for-flash-to-use/109804 "2004-05-09T17:04:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![BlodoPKNZ](https://avatars.discourse-cdn.com/v4/letter/b/e99b99/32.png) [@BlodoPKNZ](https://forum.kirupa.com/u/BlodoPKNZ)
#### Post date: [May 9, 2004, 5:04pm UTC](https://forum.kirupa.com/t/changing-text-files-for-flash-to-use/109804/1 "2004-05-09T17:04:47Z")

</div>

Im doing a flash site, and trying to do it with 2 languages. They are contained in 2 separate text files. Now the language selector is placed just after the preloader, containing 2 buttons, each with a portion of code  
Button 1:

```auto
on (release) {
 _global.lang = "polski";
 gotoAndPlay(3);
}

```

Button 2:

```auto
on (release) {
 _global.lang = "english";
 gotoAndPlay(3);
}

```

And (for now) 1 textfield in a container clip, the container clip has this code (placed on a frame):

```auto
if (_global.lang="english") {
 loadText = new loadVars();
 loadText.load("pagetext_eng.txt");
 loadText.onLoad = function(success) {
  if (success) {
   //trace(success);
   newsbox.html = true;
   newsbox.htmlText = this.news;
 }
};
} else if (_global.lang="polski") {
 loadText = new loadVars();
 loadText.load("pagetext_pl.txt");
  loadText.onLoad = function(success) {
  if (success) {
   //trace(success);
   newsbox.html = true;
   newsbox.htmlText = this.news;
  }
 };
}

```

Now flash just for hells dogs doesnt want to load a txt file. Wheres the error then?
