# Dynamically Loading Text Troubles

**URL:** <https://forum.kirupa.com/t/dynamically-loading-text-troubles/65710>\
**Category:** flash\
**Created:** [September 28, 2004, 11:38pm UTC](https://forum.kirupa.com/t/dynamically-loading-text-troubles/65710 "2004-09-28T23:38:26Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ninja\_Munky](https://avatars.discourse-cdn.com/v4/letter/n/bbe5ce/32.png) [@Ninja\_Munky](https://forum.kirupa.com/u/Ninja_Munky)\
**Post date:** [September 28, 2004, 11:38pm UTC](https://forum.kirupa.com/t/dynamically-loading-text-troubles/65710/1 "2004-09-28T23:38:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 29, 2004, 1:44am UTC](https://forum.kirupa.com/t/dynamically-loading-text-troubles/65710/2 "2004-09-29T01:44:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 29, 2004, 4:33am UTC](https://forum.kirupa.com/t/dynamically-loading-text-troubles/65710/3 "2004-09-29T04:33:36Z")

</div>

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](http://www.parabol-designs.com/projects/dbrown/testy.htm)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 29, 2004, 7:25am UTC](https://forum.kirupa.com/t/dynamically-loading-text-troubles/65710/4 "2004-09-29T07:25:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 29, 2004, 7:37am UTC](https://forum.kirupa.com/t/dynamically-loading-text-troubles/65710/5 "2004-09-29T07:37:55Z")

</div>

nope… that dont do anythign different wanna see the file

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 29, 2004, 7:47am UTC](https://forum.kirupa.com/t/dynamically-loading-text-troubles/65710/6 "2004-09-29T07:47:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 29, 2004, 7:59am UTC](https://forum.kirupa.com/t/dynamically-loading-text-troubles/65710/7 "2004-09-29T07:59:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 29, 2004, 10:35am UTC](https://forum.kirupa.com/t/dynamically-loading-text-troubles/65710/8 "2004-09-29T10:35:32Z")

</div>

> [@Krusader](#):
>
> 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](http://www.parabol-designs.com/pic.jpg)  
[screenshot2](http://www.parabol-designs.com/pic2.jpg)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 29, 2004, 11:45am UTC](https://forum.kirupa.com/t/dynamically-loading-text-troubles/65710/9 "2004-09-29T11:45:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 1:04am UTC](https://forum.kirupa.com/t/dynamically-loading-text-troubles/65710/10 "2004-09-30T01:04:31Z")

</div>

yah ill send u a file if ud liek

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 1:27am UTC](https://forum.kirupa.com/t/dynamically-loading-text-troubles/65710/11 "2004-09-30T01:27:14Z")

</div>

i used the component from flash loaded and that worked

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 8:11am UTC](https://forum.kirupa.com/t/dynamically-loading-text-troubles/65710/12 "2004-09-30T08:11:03Z")

</div>

You made a mistake in your file your code was

```php
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

```auto
scroller.text = this.news;

```

news is a variable referring to your text file, in your text file you’ll have something like news=blalbalbalblalalblabalbalbblablablabalblabla

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 30, 2004, 8:08pm UTC](https://forum.kirupa.com/t/dynamically-loading-text-troubles/65710/13 "2004-09-30T20:08:46Z")

</div>

thanks man… i knew i needed some other eyes…

works now [www.parabol-designs.com/projects/dbrown/testy.htm](http://www.parabol-designs.com/projects/dbrown/testy.htm)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 1, 2004, 2:42pm UTC](https://forum.kirupa.com/t/dynamically-loading-text-troubles/65710/14 "2004-10-01T14:42:58Z")

</div>

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](http://www.kirupa.com/developer/mx/percentagepreloader.htm) , just an advice 😉
