Html 对象未删除createjs中阶段的子级
我创建了一个包含一个圆圈和一个文本的舞台。我正在使用Html 对象未删除createjs中阶段的子级,html,createjs,Html,Createjs,我创建了一个包含一个圆圈和一个文本的舞台。我正在使用 var tween = createjs.Tween.get(ball, {loop:true}) .to({x:ball.x, y:canvas.height - 55, rotation:-360}, 1500, createjs.Ease.bounceOut) .wait(1000) .to({x:canvas.widt
var tween = createjs.Tween.get(ball, {loop:true})
.to({x:ball.x, y:canvas.height - 55, rotation:-360}, 1500, createjs.Ease.bounceOut)
.wait(1000)
.to({x:canvas.width-55, rotation:360}, 2500, createjs.Ease.bounceOut)
.wait(1000).call(stop);
function stop(){
stage.removeChild(txt);
stage.removeChild(ball);
createjs.Ticker.removeEventListener("tick", tick);
createjs.Ticker.removeEventListener("tick", stage);
}
但是stop方法中的removechild没有调用。谁能告诉我哪里弄错了。您可以通过向“call”函数传递一个作用域来解决这个问题。当前它正在调用球实例上的stop
.wait(1000).调用(stop,null,this);