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:
on (release) {
_global.lang = "polski";
gotoAndPlay(3);
}
Button 2:
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):
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?