[]TimeLine调用destroy报错&执行完成后回到起点

使用的是官方的TimeLine demo
问题1:如果在onComplete中调用destroy报错
问题2【用法问题请无视】:如果注释掉“turnUp”, 在动画执行完成后, 图片的x,y坐标变成了起始坐标
 
报错信息:

.max.js:12479 Uncaught TypeError: Cannot read property 'length' of null at TimeLine.__proto._update (HMain.max.js:12479) at TimerHandler.__proto.run (HMain.max.js:9196) at Timer.__proto._update (HMain.max.js:8951) at Stage.__proto.render (HMain.max.js:16932) at Stage.__proto._loop (HMain.max.js:16892) at loop (HMain.max.js:5472)
 
 private function createTimerLine():void
{

timeLine.addLabel("turnRight",0).to(target,{x:450, y:100, scaleX:0.5, scaleY:0.5},2000,null,0)
.addLabel("turnDown",0).to(target,{x:450, y:300, scaleX:0.2, scaleY:1, alpha:1},2000,null,0)
.addLabel("turnLeft",0).to(target,{x:100, y:300, scaleX:1, scaleY:0.2, alpha:0.1},2000,null,0)
// .addLabel("turnUp",0).to(target,{x:100, y:100, scaleX:1, scaleY:1, alpha:1},2000,null,0);
timeLine.play(0,true);
timeLine.on(Event.COMPLETE,this,this.onComplete);
timeLine.on(Event.LABEL, this, this.onLabel);
}
private function onComplete():void
{
trace("timeLine complete!!!!");
timeLine.pause();
timeLine.destroy();
// Laya.timer.frameOnce(10, this, dispose);
}
 
已邀请:

cuixueying

赞同来自:

该问题已经修复,下次更新版本就好了,如果着急用,可以提前联系管理员,提前发你最新版本!

要回复问题请先

商务合作
商务合作