# How get vars if I use LoadVars.onData

**URL:** <https://forum.kirupa.com/t/how-get-vars-if-i-use-loadvars-ondata/178862>\
**Category:** flash\
**Created:** [February 14, 2006, 9:46pm UTC](https://forum.kirupa.com/t/how-get-vars-if-i-use-loadvars-ondata/178862 "2006-02-14T21:46:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jankratochvil](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jankratochvil/32/566_2.png) [@jankratochvil](https://forum.kirupa.com/u/jankratochvil)\
**Post date:** [February 14, 2006, 9:46pm UTC](https://forum.kirupa.com/t/how-get-vars-if-i-use-loadvars-ondata/178862/1 "2006-02-14T21:46:52Z")

</div>

I use this code and try to get data from simply txt file.  
I explored with onData method.  
AS:

```auto
var myLV:LoadVars = new LoadVars ();
myLV.onData = function (scr:String)
{
	if (scr == undefined)
	{
		trace ("Error loading content");
	}
	else
	{
		_level0.createTextField ("scr_txt", 1, 10, 10, 200, 200);
		_level0.scr_txt.border = true;
		_level0.scr_txt.text = scr;
		_level0.createTextField ("a_txt", 2, 10, 300, 200, 200);
		_level0.a_txt.border = true;
		_level0.a_txt.text = myLV.var_a;
	}
};
myLV.load ("myText.txt", myLV, "GET");

```

How can I get the value of **var\_a**?  
Shoud I use for it method **onload**?

Thanks  
TXT file has those vars:

```auto
var_a=Hello&var_b=World

```
