每当我在 Adobe Flash CS4 中编译我的项目时,都会遇到以下错误消息:
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]);
}
}
任何输入表示赞赏。谢谢。:)