[LayaAir 2.0]TypeError: Laya.MovieClip is not a constructor

let mc:Laya.MovieClicp = new Laya.MoveClip();
 
 
报错:
TypeError: Laya.MovieClip is not a constructor
preload.js:55
at XLoadUIScript.32.XLoadUIScript._init (file:///D:/1MiniGame/mini-game-client/minigame1/bin/js/bundle.js:3001:18)
 
at XLoadUIScript.32.XLoadUIScript.onStart (file:///D:/1MiniGame/mini-game-client/minigame1/bin/js/bundle.js:2939:14)
 
at LaterHandler.__proto.run (file:///D:/1MiniGame/mini-game-client/minigame1/bin/libs/laya.core.js:6143:45)
 
at CallLater.__proto._update (file:///D:/1MiniGame/mini-game-client/minigame1/bin/libs/laya.core.js:6066:14)
 
at Stage.__proto.render (file:///D:/1MiniGame/mini-game-client/minigame1/bin/libs/laya.core.js:21377:16)
 
at Stage.__proto._loop (file:///D:/1MiniGame/mini-game-client/minigame1/bin/libs/laya.core.js:21330:8)
 
at loop (file:///D:/1MiniGame/mini-game-client/minigame1/bin/libs/laya.core.js:9407:15)
 
 
已邀请:

nico

赞同来自:

这个是用来干嘛的,是否是少引用了库文件导致的,

妙飞

赞同来自:

把应用场景,产生错误的相关代码贴一下比较好发现问题

Gavin

赞同来自:

我也遇到这个问题了, 我是按照官网的教程走到这一步报错
代码及结果如下图
 
 
 

Gavin

赞同来自:

库文件是引入了的

Gavin

赞同来自:

解决了,确实是没有引入laya.ani.js 库文件

要回复问题请先

商务合作
商务合作