Here's an update that might help somebody. My initial loop was stupid:
for (var j:uint = 0; j < myObjectContainer.children.length; j++) {
myObjectContainer.removeChild(myObjectContainer.children[j]);
}
and buggy because sometimes there would be unordered indexes in this
children array! For example, children[0], children[1], and children[3]
contained objects, but it would not delete children[3] for reasons
which should be apparent.
A much better loop for clearing object containers would be the
following:
while (myObjectContainer.children.length) {
myObjectContainer.children.pop();
}
Matt