Hello everyone,
I am encountering the following error message whenever I compile my project in 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()
the code that generates the error is shown below:
for (var i:int = 0; i < particleArrayForward.length; i++ ) {
if (particleArrayForward[i] != null) {
trace("particleArrayForward[" + i + "]:" + particleArrayForward[i]);
this.removeChild(particleArrayForward[i]);
}
}
Any input's appreciated. Thanks. :)