So I have this button that when I click on it I want it to load two different text files into two different text boxes. This code works just fine for loading 1 file into one box, but not when I try to do the other thing. Whats wrong with it?
on (release) {
loadText = new loadVars();
loadText.load("TEXT5.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
newsBox2.html = true;
newsBox2.htmlText = this.myNews;
}
};
loadText = new loadVars();
loadText.load("TEXT6.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
newsBox.html = true;
newsBox.htmlText = this.myNews;
}
};
}