Dynamically Loading Text Troubles

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.

change the loadVars to LoadVars, thats what i did to get it working, something to do with Action Script v2.0, anyway, good luck

i am still getting no text to appear… capitalizing the L in loadVars got rid of that error… but now the text isnt appearing at all…

check it out nothings appearing

news.txt

news=
Sept 28th 2004 - hartford civic center

check it out its not even displaying…
link

hmm, sorry that didn’t work, try placing formatting your text differently eg,

news=Sept 28th 2004 - hartford civic center

this might help, i’ve found that flash is quite picky about formating in txt documents
hope that helps

nope… that dont do anythign different wanna see the file

Post your code or your file, so we will be able to help you

yeah, posting the code or file would really help, sorry i haven’t been able to help much

you used the tutorial here to build your dynamic text right?

yes i have

loadText = new LoadVars();
loadText.load(“news.txt”);
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.news;
};

heres screenshots
screenshot1
screenshot2

can you post or upload your fla ? Or is your text masked ?

yah ill send u a file if ud liek

i used the component from flash loaded and that worked

You made a mistake in your file your code was

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

thanks man… i knew i needed some other eyes…

works now www.parabol-designs.com/projects/dbrown/testy.htm

You’re welcome, glad it’s working now. Btw, your preloader is a bit heavy, if you want something lighter and more accurate, take a look at this http://www.kirupa.com/developer/mx/percentagepreloader.htm , just an advice :wink: