Why doesn't LoadVars() work?

I have a txt file in the folder “info” containing:

In the fla file i have this code in the first frame:

folder = “info/”;

infoVars = new LoadVars();


When i run my movie, infoVars.load returns
undefined instead of 10.

Can someone help me???

It should be like this:

Frame 1 in the timeline:
folder = “info/”;
infoVars = new LoadVars();
function loadVars() {
_root.infoVars.onLoad = function(success) {
if (success) {
//load = bad word, call it loadData or something else instead!
} else {


and on the button or what you want to use as the “trigger”:
_root.loadVars(); //if you have other than AS 2.0, it should be loadVars instead i believe.

I will attach the whole “project”. (made in MX2004 w/ AS 2.0)


it works now!