我基本上想做的是更改输出实例的名称。
但我遇到的问题是如何将通过函数'find_name'传递的变量发送到'Event.Complete'函数loadNameInfo?
下面的代码:
// Finds a persons name using the ID
private function find_name(page_Name='search.php',instance_name='name',get1='g1=1',get2='g2=2',get3='g3=3'):void
{
var randomParam:String = "?p=" + Math.floor(Math.random() * (10000000));
var create_URL = (URL + page_Name + randomParam + '&'+ get1 + '&' + get2 + '&' + get3);
_loader = new URLLoader();
_request = new URLRequest(create_URL);
_request.method = URLRequestMethod.POST;
_loader.addEventListener(Event.COMPLETE, loadNameInfo);
_loader.load(_request);
}
// Loads the name into the correct place
public function loadNameInfo(e:Event)
{
instance_name.text = e.target.data;
}
这种事情可能吗?
伊莱