I have the folowing codo to load text from a text file into a text field in my flash document:
loadVarsText = new loadVars();
loadVarsText.load(“homePage.txt”);
loadVarsText.onLoad = function(success) {
if (success) {
trace(“done loading”);
header.text = this.headerText;
scroller.text = this.mainText;
} else {
trace(“not loaded”);
}
};
I want to know how I make it change the text file that it loads from when a button is clicked. I will keep the:
header.text = this.headerText;
scroller.text = this.mainText;
the same, and I want to make the homePage.txt file load when the flash file starts, that is what it does right now by placing the code on the main timeline.
any help would be great.