Is it possible to use one LoadVars object to load different text files into different text boxes?
I know I can do this:
var textLoader:LoadVars = new LoadVars();
textLoader.onData = function(content) {
trace("Data loaded successfully.");
someBox.text = content;
};
button1.onRelease = function() {
textLoader.load("file.txt");
}
button2.onRelease = function() {
textLoader.load("file2.txt");
}
I know this will load two different text files into the same text field, but I want to be able to define different boxes, like maybe
textLoader.load("file.txt", someBox.text);
though that is obviously not correct.
Any ideas?