Whenever I try to load text dynamically, I get this error:
Warning Scene=Scene 1, layer=text, frame=1:Line 1: Case-insensitive identifier ‘loadVars’ will obscure built-in object ‘LoadVars’.
loadText = new loadVars();
Total ActionScript Errors: 1 Reported Errors: 1
It happened when I tried to make a dynamic text box, and then it also came up when I downloaded the source files for one of the tutorials here on kirupa. I’m not sure what’s up with it.
loadText = new LoadVars();
loadText.load("news.txt");
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.news;
};
and your textfield has the instance name “news”, you have to change your textfield’s instance name to “scroller” if you want it to work.
In this line of code
scroller.text = this.news;
news is a variable referring to your text file, in your text file you’ll have something like news=blalbalbalblalalblabalbalbblablablabalblabla