[]xhr的on和once什么区别,官网例子
Laya.init(1136, 640);
var xhr:HttpRequest = new HttpRequest();
xhr.http.timeout = 10000;//设置超时时间;
xhr.once(Event.COMPLETE,this,completeHandler);
xhr.once(Event.ERROR,this,errorHandler);
xhr.on(Event.PROGRESS,this,processHandler);
var xhr:HttpRequest = new HttpRequest();
xhr.http.timeout = 10000;//设置超时时间;
xhr.once(Event.COMPLETE,this,completeHandler);
xhr.once(Event.ERROR,this,errorHandler);
xhr.on(Event.PROGRESS,this,processHandler);
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
Monica - 知识达人
赞同来自:
on 则需要手动用 off 进行移除