# sendAndLoad a text file

**URL:** <https://forum.kirupa.com/t/sendandload-a-text-file/71579>\
**Category:** flash\
**Created:** [November 26, 2004, 6:09pm UTC](https://forum.kirupa.com/t/sendandload-a-text-file/71579 "2004-11-26T18:09:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmerens](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bmerens](https://forum.kirupa.com/u/bmerens)\
**Post date:** [November 26, 2004, 6:09pm UTC](https://forum.kirupa.com/t/sendandload-a-text-file/71579/1 "2004-11-26T18:09:07Z")

</div>

hello,

I try to load a variable from a text file.

I have 2 problems :

1. swf\_on\_level0 loads swf2\_onlevel5  
and swf2\_onlevel5 should load the variable from the text file

I tried this :  
sendvar = new LoadVars();  
reception\_var = new LoadVars();

```
	sendvar.onLoad = function(success) {
		if (success) {
			
			trace(" blabla");
		} else {
			trace("didn't work");
		}
	};
sendvar.sendAndLoad("text_file.txt, reception_var, "POST");
         
         trace(reception_var.var1);

```

but there was an error on loading the file !!!

and I put in the txt file : var1=Hello

perhaps I’m completely wrong ??? or not??? One thing is sure that I need to put var1 in an object to use it on level 5…I think :mu:

Thanks for your help 🙂

:glasses:
