# Loading a \*.txt innto flash

**URL:** <https://forum.kirupa.com/t/loading-a-txt-innto-flash/285556>\
**Category:** flash\
**Created:** [April 2, 2009, 9:18am UTC](https://forum.kirupa.com/t/loading-a-txt-innto-flash/285556 "2009-04-02T09:18:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![m\_h\_w](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@m\_h\_w](https://forum.kirupa.com/u/m_h_w)\
**Post date:** [April 2, 2009, 9:18am UTC](https://forum.kirupa.com/t/loading-a-txt-innto-flash/285556/1 "2009-04-02T09:18:50Z")

</div>

Hey i want to import the content of a txt document to a flash website.

I got this code to import the text:

var myTextLoader:URLLoader = new URLLoader();  
myTextLoader.dataFormat=URLLoaderDataFormat.VARIABLES;

myTextLoader.addEventListener(Event.COMPLETE, onLoaded);

function onLoaded(e:Event):void {  
trace(e.target.data.myTitle);  
trace(e.target.data.myBody);  
trace(e.target.data.myURL);  
}

myTextLoader.load(new URLRequest(“myText.txt”));

I am wondering how i will make that text load into a dynamic textfield.

Anyone got any input? 🙂
