我遇到以下錯誤消息時,我編我在Adobe的Flash CS4項目:的ActionScript 3.0的參數錯誤2025(刪除子問題)
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at stageRotation/spawnParticle()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
生成錯誤的代碼如下所示:
for (var i:int = 0; i < particleArrayForward.length; i++) {
if (particleArrayForward[i] != null) {
trace("particleArrayForward[" + i + "]:" + particleArrayForward[i]);
this.removeChild(particleArrayForward[i]);
}
}
任何輸入讚賞。謝謝。 :)
感謝。有效! – Smiley 2010-07-27 07:22:16