[]ReferenceError: Loading_fly is not defined

LAYA AIR 调试会报界面错  ReferenceError: Loading_fly is not defined
F0DBED83F812BCCF9C8A4BB5BE591D6F.png

 
chrome 正常运行
 
查看之后发现是 diango 上增加动画的问题

Laya.Animation.createFrames(loading_array, 'loading')
已邀请:

apeCom

赞同来自:

查看之后发现是 diango 上增加动画的问题

Laya.Animation.createFrames(loading_array, 'loading')
 
一旦增加到这行代码就崩掉了
 

apeCom

赞同来自:

var Loading_fly = function (_super) {
function Loading_fly() {
Loading_fly.super(this);
this.onPlay();
}
Laya.class(Loading_fly, "Loading_fly", _super)
var _proto = Loading_fly.prototype;

_proto.onPlay = function () {
UIConfig.popupBgAlpha = 0.85;
UIConfig.closeDialogOnSide = false;
this.diango = new Laya.Dialog();
this.diango.width = Laya.stage.width;
this.diango.height = Laya.stage.height;

var loading_array = [];
for(var i = 1; i < 28; i++ ){
loading_array.push('loading/'+ i +'@2x.png',)
}
Laya.Animation.createFrames(loading_array, 'loading')
this.fly = new Laya.Animation();
this.fly.play(0, true, 'loading')
this.bounds = this.fly.getGraphicBounds();
this.fly.pivot(this.bounds.width / 2, this.bounds.height / 2);
this.fly.pos(Laya.stage.width / 2, Laya.stage.height / 2);
this.diango.addChild(this.fly)

this.diango.show();
this.diango.popup();
}

_proto.onClose = function () {
this.diango.close();
}
return Loading_fly;
}(Laya.Sprite);

wudi199553

赞同来自:

根据你贴的代码我们创建了一个项目测试没有问题!请上传一个有问题的、可以直接运行的例子。谢谢!

wudi199553

赞同来自:

你贴出来的代码第18行括号前面多了一个逗号

要回复问题请先

商务合作
商务合作