0

.call 内部的 onComplete 方法很快就会被调用。它应该只在最后被调用。

代码

createjs.Tween.get(this).to({filled: 1}, duration).addEventListener("change", () => { this.renderFill(color)}).call(onComplete());

我试图在调用之前添加一个 .wait() ,但它给出了一个例外。

这一个也不起作用。在补间结束他的工作之前调用 onComplete 方法。

createjs.Tween.get(this).to({filled: 1}, duration).wait(duration).call(onComplete()).addEventListener("change", () => { this.renderFill(color)});
4

1 回答 1

2

call期望它会调用一个函数......所以不要调用它。即onComplete不是onComplete()

createjs.Tween.get(this).to({filled: 1}, duration).addEventListener("change", () => { this.renderFill(color)}).call(onComplete);
于 2014-06-13T10:47:07.163 回答