# External txt file to scroller

**URL:** <https://forum.kirupa.com/t/external-txt-file-to-scroller/25683>\
**Category:** Uncategorized\
**Created:** [July 15, 2003, 6:02pm UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683 "2003-07-15T18:02:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Domo](https://avatars.discourse-cdn.com/v4/letter/d/ea5d25/32.png) [@Domo](https://forum.kirupa.com/u/Domo)\
**Post date:** [July 15, 2003, 6:02pm UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/1 "2003-07-15T18:02:28Z")

</div>

I read the tutorial on loading external text into scrollers located here: [http://www.kirupa.com/developer/mx/multiple\_dynamictext.htm](http://www.kirupa.com/developer/mx/multiple_dynamictext.htm)

I was wondering what AS code would I use if I just wanted to load one txt file into the scroller right from the get go.

Thanks :asian:

---

<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:** [July 15, 2003, 6:05pm UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/2 "2003-07-15T18:05:15Z")

</div>

–copy and paste from an old project i did—  
[AS]  
loadUpdateText = new loadVars();  
loadUpdateText.load(“updates.txt”);  
loadUpdateText.onLoad = function() {  
updates.html = true;  
updates.wordWrap = true;  
updates.htmlText = this.updateText;  
};  
[/AS]

---

<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:** [July 15, 2003, 6:17pm UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/3 "2003-07-15T18:17:52Z")

</div>

Thanks a lot,

is there any certain things I have to edit/type in for my dynamic input text field? (var, instance name)

Also, in the tutorial, it says to start off the txt file with “myNews=”…

would i have to do something like that the the txt file im using?

- Domo

---

<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:** [July 15, 2003, 6:28pm UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/4 "2003-07-15T18:28:52Z")

</div>

well updates is the instance name, i dont use a variable name,  
and if your using my code you should start off your textfile with

updateText=

---

<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:** [July 15, 2003, 6:31pm UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/5 "2003-07-15T18:31:25Z")

</div>

Thanks a million! I got it to work! 🙂

---

<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:** [July 15, 2003, 6:34pm UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/6 "2003-07-15T18:34:49Z")

</div>

good i’m glad 🙂 and your welcome of course

---

<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:** [July 24, 2003, 4:14am UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/7 "2003-07-24T04:14:43Z")

</div>

Hi,

I am trying to do exactly what you have done. I did the dynamic scroller tut, and modified the code from kirupa.txt to update.txt, and changed the kirupatext= to updateText. I tried using your code from above, but it still isn’t working. I have my .swf & .fla files in the same folder as my .txt. I’m not to sure what the problem is? I checked the instance name, and I just can’t get it. I am on a Mac, so I dunno if that is the problem. Thanks for any help or ideas! Cheers!

---

<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:** [July 24, 2003, 4:21am UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/8 "2003-07-24T04:21:41Z")

</div>

[AS]loadText = new loadVars();  
loadText.load(“textfile.txt”);  
loadText.onLoad = function(OK) {  
if (OK) {  
myText.html = true;  
myText.htmlText = this.text;  
}  
};[/AS]_textfile.txt_ is your txt file;  
_text_ is the variable inside your txt file;  
_myText_ is the instance name of your textfield;  
if your textfield is inside a movie clip, replace the last 2 lines for:  
[AS]movieClip.myText.html = true;  
movieClip.myText.htmlText = this.text;[/AS]Where _movieClip_ is the instance name of the movie clip with the textfield inside

---

<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:** [July 24, 2003, 5:52am UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/9 "2003-07-24T05:52:43Z")

</div>

thanks for your quick response. i am still having troubles though, i’m not to sure what the problem is. i looked on macromedia, and found this tut

[http://www.macromedia.com/support/flash/ts/documents/dynamic\_text\_scrollmx.htm](http://www.macromedia.com/support/flash/ts/documents/dynamic_text_scrollmx.htm)

even that didn’t work, the done loading worked, but nothing else. the scroller does pop up, but none of the text. i dunno?:!:

---

<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:** [July 24, 2003, 5:54am UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/10 "2003-07-24T05:54:39Z")

</div>

your textfile should be something like this:

text=here goes your content&

---

<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:** [July 24, 2003, 6:19am UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/11 "2003-07-24T06:19:53Z")

</div>

jebas, the tut looked so simple! lol, i uploaded my zip, if you want to have a look at it, otherwise i don’t know whats going on. mind u i am still a newbie. thanks for helping though! :thumb:

–amanda

[http://www.haydenhaven.com/scroller.zip](http://www.haydenhaven.com/scroller.zip)

---

<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:** [July 24, 2003, 6:23am UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/12 "2003-07-24T06:23:22Z")

</div>

Replace your txt file content for this:

text=blah blah blah&

---

<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:** [July 24, 2003, 6:32am UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/13 "2003-07-24T06:32:58Z")

</div>

put the & on the end, and still nothing

---

<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:** [July 24, 2003, 6:39am UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/14 "2003-07-24T06:39:21Z")

</div>

Did you erase everything else besides  
text=blah blah blah&  
?

---

<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:** [July 24, 2003, 6:39am UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/15 "2003-07-24T06:39:51Z")

</div>

i’m off to bed now, thanks for helping claudio, i will be back tomorrow, cheers!

---

<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:** [July 24, 2003, 6:40am UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/16 "2003-07-24T06:40:31Z")

</div>

yes in the text file, all there is, is text=blah blah blah&

---

<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:** [July 24, 2003, 6:46am UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/17 "2003-07-24T06:46:38Z")

</div>

Then i dont know why it isnt working :-\

---

<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:** [July 24, 2003, 9:42pm UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/18 "2003-07-24T21:42:49Z")

</div>

madness! I am at school right now and just attempted the scroller, and it worked! must be the mac? thanks again!

---

<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:** [July 24, 2003, 9:49pm UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/19 "2003-07-24T21:49:24Z")

</div>

ahhh found a new problem, 2 actually. the text runs off and dosen’t go down to the next line. and even though there is more text below, the scroller dosen’t scroll up or down? any suggestions?

---

<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:** [July 24, 2003, 10:14pm UTC](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683/20 "2003-07-24T22:14:55Z")

</div>

I know the solution to the first problem - in your .fla select the textbox and in the properties panel, you should see a dropdown menu that currently says “Single Line”. Change that to “Multiline”. The text should now go onto the next line(s) accordingly.

[Next page](https://forum.kirupa.com/t/external-txt-file-to-scroller/25683.md?page=2)
