Greetings,
I am having troubles loading a varibale containing some text from an external .txt file. Here is the code:
function changeText(whichOne) {
lv = new LoadVars();
lv.load("files/map_log.txt");
lv.onLoad = function(ok) {
if (ok) {
sootIntro.htmlText = this.whichOne;
};
};
};
ba.onRollOver = function() {
changeText(this._name);
};
This is loading from the text file “map_log.txt” this text:
&ba=<span class='header'>b1</span><br /><br /><p class='body'>While the effect of human activity on the global climate is hotly debated, physical signs of environmental change are all around us.</span></p>
This code does work correctly when I hard code “sootIntro.htmlText = this.ba;” but it only displays “undefined” when I don’t. Any ideas on this one?
Thanks a ton for your time!