I have this function structure:
function doStuff():Boolean {
variables = new LoadVars();
variables.anything = "xxx";
variables.onLoad = function(success) {
if (success) {
doStuff;
results = true;
} else {
results = false;
}
};
variables.sendAndLoad(url, variables, "POST");
return results;
}
Function works fine, but can“t return properly the 'results' value. Any idea?