Lading data from txt file shows undefined?

Hi, I have this little code, just loading text from a file, but as the title says, the variable s seams to remain unchanged :S

var s:String;
var loadText:LoadVars = new LoadVars();
loadText.onData = function(thisIsAText:String) {
 s = thisIsAText;
//if i put a trace here, it's ok :S
};
loadText.load("test.txt");
trace(s);

What’s going here?

Thanks in advance, Alex.