Get data with URLLoader using one function?

Problem: How can I write a function so that it assigns the retrived data to a variable?

Setup:
data.txt contents:
“This is my data.”

Code:


// Simplest way to get String data from a txt/php file:
function queryData(_url:String):void {
	var dataSource:URLRequest = new URLRequest(_url);
	dataSource.method = URLRequestMethod.GET;

	var dataLoader:URLLoader = new URLLoader();
	dataLoader.dataFormat = URLLoaderDataFormat.TEXT
	dataLoader.addEventListener(Event.COMPLETE, retrieveData);
	dataLoader.load(dataSource);
}

function retrieveData(e:Event):void {
	trace(e.target.data); // traces: This is my data.
}
queryData("data.txt") // traces: This is my data.
// And that's fine, but I want to auto-assign the retrieved data to a variable:
var myRetrievedData:String = queryData("data.txt");
trace(myRetrievedData); // traces: null, how to fix it so that it traces: 'This is my data.' ?

Is it possible to do this?