QUalcuno sa dirmi perchè questa cosa semplicissima:

codice:
function returnTheValue(input){

	var send:LoadVars = new LoadVars;
	var receive:LoadVars = new LoadVars;
	send.index = input;
	send.sendAndLoad("data.php",receive,"POST");
	loadVars.onLoad = function(){
	
	}
	receive.onLoad = function(){
		encrypted = this.text;
		return encrypted;
	}
	
}

test = returnTheValue(276);
trace(test)
Mi ritorna sempre UNDEFINED nel trace, mentre se io metto il trace(this.text) dentro receive.onLoad il valore è corretto?!

Premesso lo script php naturalmente è raggiungibile e funzionante.
Grazie!