If... else if question

I want to have some text display if my external text file doesn’t load right away but I’m not sure how to go about that. I was thinking this code may work?? Any help would be great :slight_smile:

loadText = [color=#000084]new[/color] [color=#000084]loadVars[/color]();
loadText.[color=#000084]load[/color]("[color=#0000ff]your_txt.txt[/color]");
loadText.[color=#000084]onLoad[/color] = [color=#000084]function[/color](success) {
		[color=#000084]if[/color] (success) {
				textBox.[color=#000084]html[/color] = [color=#000084]true[/color];
				textBox.[color=#000084]htmlText[/color] = [color=#000084]this[/color].myNews;
		}
		[color=#000084]else[/color] [color=#000084]if[/color] (another condition) {
				textBox.[color=#000084]text[/color] = "[color=#0000ff]Loading text...[/color]";
		}
		[color=#000084]else[/color] {
				textBox.[color=#000084]text[/color] = "[color=#0000ff]Text failed to load[/color]";
		}
};