[LayaAirIDE 2.0]使用多个时间轴动画 demo.ani(0,true,'name')失效
//初始化引擎
Laya.init(600, 400);
//设置舞台背景色
Laya.stage.bgColor = "#ffffff";
//加载图集成功后,执行onLoaded回调方法
Laya.loader.load("res/atlas/ui/boos.atlas", Laya.Handler.create(this, onLoaded));
function onLoaded() {
// //创建一个Animation实例
// var tl = new Laya.Animation();
// //加载动画文件
// tl.loadAnimation("test.ani");
// //添加到舞台
// Laya.stage.addChild(tl);
// //播放Animation动画
// tl.play();
//创建一个新的Animation实例
var tl2 = new Laya.Animation();
//加载动画文件
tl2.loadAnimation("test.ani");
//添加到舞台
Laya.stage.addChild(tl2);
//播放Animation动画的pivot动画
tl2.play(0,true,'zxc');
//动画的显示位置
tl2.pos(0,200);
}
报错:
ani not found: test.ani#zxc
laya.core.js:32435
ani not found: test.ani#zxc
laya.core.js:32435
ani not found: test.ani#zxc
Laya.init(600, 400);
//设置舞台背景色
Laya.stage.bgColor = "#ffffff";
//加载图集成功后,执行onLoaded回调方法
Laya.loader.load("res/atlas/ui/boos.atlas", Laya.Handler.create(this, onLoaded));
function onLoaded() {
// //创建一个Animation实例
// var tl = new Laya.Animation();
// //加载动画文件
// tl.loadAnimation("test.ani");
// //添加到舞台
// Laya.stage.addChild(tl);
// //播放Animation动画
// tl.play();
//创建一个新的Animation实例
var tl2 = new Laya.Animation();
//加载动画文件
tl2.loadAnimation("test.ani");
//添加到舞台
Laya.stage.addChild(tl2);
//播放Animation动画的pivot动画
tl2.play(0,true,'zxc');
//动画的显示位置
tl2.pos(0,200);
}
报错:
ani not found: test.ani#zxc
laya.core.js:32435
ani not found: test.ani#zxc
laya.core.js:32435
ani not found: test.ani#zxc
没有找到相关结果
已邀请:
要回复问题请先登录
2 个回复
龚源远
赞同来自:
Aar0n
赞同来自: