我想在 Tweenlite 完成补间后通过 removeChild 删除对象。但它并没有真正起作用,因为我的对象仍在 DisplayList 中。我无法弄清楚这个问题,所以如果有人可以帮助我解决这个问题,我会很高兴。提前致谢。:)
//TweenLite.to(sndText, .5, {alpha:0, onComplete:removeChild, onCompleteParams:[sndText]});//does not really work; still in DisplayList
TweenLite.to(sndText, .5, {alpha:0});
TweenLite.to(musicText, .5, {alpha:0});
TweenLite.to(sndSlider, .5, {alpha:0});
TweenLite.to(musicSlider, .5, {alpha:0});
TweenLite.to(okBtn, .5, {alpha:0});
TweenLite.to(sndMinus, .5, {alpha:0});
TweenLite.to(sndPlus, .5, {alpha:0});
TweenLite.to(musicMinus, .5, {alpha:0});
TweenLite.to(musicPlus, .5, {alpha:0, onComplete:removeSettings});
//removeChild(sndText); //this works but I don't know why
override public function removeSettings():void {
//removeChild doesn't really work (still in DisplayList)
removeChild(sndText);
removeChild(musicText);
removeChild(sndSlider);
removeChild(musicSlider);
removeChild(okBtn);
removeChild(sndMinus);
removeChild(sndPlus);
removeChild(musicMinus);
removeChild(musicPlus);
}