I’ve just encountered a very weird problem. I have a DisplayObject that can trace its parent but not its parent.parent. The weird thing is that its parent still belongs to the correct parent. I hope that’s not too confusing.
-Character
[INDENT]- Menu
[INDENT]-Textfield
- Button
- Button[/INDENT][/INDENT]
This is my display list. I want to be able to create multiple instances of Character, each with their own Menu, with Buttons and a TextField. The problem comes when a new Character is created, the Textfield from the older instances disappear. Only the Textfield from the most recently created Character appears. When I trace them, the Textfield can’t find its grandparent (Character), but yet its parent (Menu) recognises Character as its parent.
I don’t understand how this can happen. The Button classes have no such problem and looking through my code there isn’t really much difference how the Textfield and the Buttons were implemented.
For more clarity, my Characters are stored in an array, as are my Buttons.