# Text file

**URL:** <https://forum.kirupa.com/t/text-file/9669>\
**Category:** Uncategorized\
**Created:** [December 16, 2002, 10:21am UTC](https://forum.kirupa.com/t/text-file/9669 "2002-12-16T10:21:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![roshanonline](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@roshanonline](https://forum.kirupa.com/u/roshanonline)\
**Post date:** [December 16, 2002, 10:21am UTC](https://forum.kirupa.com/t/text-file/9669/1 "2002-12-16T10:21:26Z")

</div>

HI there,  
Can anyone let me know kindly,  
How to display a .txt file in flash and also to display an xml file in flash.

Thanks,

---

<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:** [December 16, 2002, 12:45pm UTC](https://forum.kirupa.com/t/text-file/9669/2 "2002-12-16T12:45:42Z")

</div>

_kind voice_ well, there are a few tutorials about this on this site (the text thing, I mean).

Concerning XML, here is a tute: [TUTE](http://www.kirupaforum.com/showthread.php?s=&threadid=9145&highlight=XML)

pom :crazy:

---

<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:** [December 16, 2002, 12:47pm UTC](https://forum.kirupa.com/t/text-file/9669/3 "2002-12-16T12:47:04Z")

</div>

[Text thinggy tute](http://www.kirupa.com/developer/mx/dynamic_scroller.asp)

---

<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:** [December 16, 2002, 1:29pm UTC](https://forum.kirupa.com/t/text-file/9669/4 "2002-12-16T13:29:58Z")

</div>

Thanks pom…  
that was very kind of you…

Many thanks,  
rosh

---

<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:** [December 16, 2002, 1:46pm UTC](https://forum.kirupa.com/t/text-file/9669/5 "2002-12-16T13:46:29Z")

</div>

Just FYI, there is an undocumented method in Flash MX that allows you to work with raw data from text files. This would be useful if, for example, you didn’t want to add variable names (like “mytext=blah blah blah”) to your text files, or if you have people that are not technically inclined uploading articles as text files. LoadVars has a method called onData that takes the raw text data and parses it for variable names and does its magic with it, spitting out variables full of text. All you need to do in order to access the raw data is simply override the onData method. You could, for example do something like this:

myTextThingy = new LoadVars();  
// overriding the built-in method  
myTextThingy.onData = function(rawData){  
myDynamicTextBoxData = rawData;  
}  
// loading the text file  
myTextThingy.load(“mytextfile.txt”);

Hope someone finds this useful.

-Al
