removeChild problem

In my project i have created an array in a class file and then instantiated the objects in my flash file. From the class file i then have added a mouseevent in which when i click one of the objects the child is removed or i use “stage.removeChild(this);” the only problem is that once the child is removed i have an error 2025. this comes from my function that sorts on enterframe in the flash file. This function sorts all of the array objects by there latitude and then gives them each an index in which that is how they are visible to the viewer. I belive that in order for this to run correctly i would need to remove that object from the array as well once the child is removed, but i have no idea how to do this. I don’t know if there is someway to get the array index of the child that has been clicked, or check the array to see if a child has been deleted. If someone could help that would be wonderful! Thanks soo much!!