-4
這是我的錯誤actionscript 3「一個術語未定義,並且沒有任何屬性。」
TypeError: Error #1010: A term is undefined and has no properties.
at p21_fla::MainTimeline/baba()[p21_fla.MainTimeline::frame1:24]
這是導致錯誤的部分:
variables.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loaderIOErrorHandler);
這是我的全部代碼
var variables:URLVariables = new URLVariables();
variables.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loaderIOErrorHandler);
var varSend:URLRequest = new URLRequest("https://gteckids.000webhostapp.com/gteckids/login.php");
varSend.method = URLRequestMethod.POST;
varSend.data = variables;
function loaderIOErrorHandler(e:Event){
trace("Error loading image thumbnail");
}
var varLoader:URLLoader = new URLLoader;
varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
varLoader.addEventListener(Event.COMPLETE, completeHandler)
variables.Parent_Username = uname_txt.text;
variables.ParentPassword = pass_txt.text;
variables.sendRequest = "parse";
varLoader.load(varSend);
function completeHandler(event:Event):void
{
var phpVar1 = event.target.data.var1;
if(phpVar1!="No"){
btn_ok.visible = true ;
lis.visible = true;
parent_id.text = phpVar1;
}
else{
btn_okw.visible = true ;
lis1.visible = true;
}
}
請勿將代碼作爲圖像發佈。在這裏粘貼完整的代碼。 – poke