我想让flash从其他网页中传入变量
LoadData = new LoadVars();
var temp:String;
LoadData.sendAndLoad("http://localhost/try/flash/dbquery.php", LoadData, 'POST');
LoadData.onLoad = function(success) {
if (success) {
//假设传回的值为"msg=aaa"
temp = this.msg;
trace(msg);
}
};
trace(temp);
////输出////////////
undefined
aaa
////////////////////
为什么会输出”undefined“??

怎样在事件函数外得到变量temp的值”aaa“呢??