# Textfile stuff

**URL:** https://forum.kirupa.com/t/textfile-stuff/219303
**Category:** Uncategorized
**Created:** [March 15, 2007, 3:10pm UTC](https://forum.kirupa.com/t/textfile-stuff/219303 "2007-03-15T15:10:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![korkor5](https://avatars.discourse-cdn.com/v4/letter/k/71c47a/32.png) [@korkor5](https://forum.kirupa.com/u/korkor5)
#### Post date: [March 15, 2007, 3:10pm UTC](https://forum.kirupa.com/t/textfile-stuff/219303/1 "2007-03-15T15:10:31Z")

</div>

hello all,

can some one help me out here. Im trying to pass a variable from a text file into a variable in flash and trace it to screen. This is what i have done so far, but its not working.what am i doing wrong?

i have created a text file in the same folder as my flash.

in the text file i have this: loadedtext=hello

flash code:

function myFunction(){  
trace(“Data is loaded”);

}  
var container:LoadVars = new LoadVars();  
container.onLoad= myFunction;  
container.load(“demo1.txt”);

trace(container.loadedtext);

thanx

korkor5
