In my game, I have a need to remove all of the stage objects (for a new level). After I call the clean up code, I check the stage to see if there are any objects remaining. I’m using the following code:
print("Stage Objects: "…display.getCurrentStage().numChildren)
I’d like to loop through and get the names of all the objects still left in memory so that I can fix my clean up code to remove them (via object:removeSelf()). I tried to loop through the stage objects but it seems that the root stage is a container of all groups and objects and I can’t figure out how to print their names or ids to the console window. All of my object have a “name” property such as object.name that I set so that I can relate them back to the object.
Any help would be appreciated and save me time.
thanks,
Rob [import]uid: 38348 topic_id: 22876 reply_id: 322876[/import]
[import]uid: 52491 topic_id: 22876 reply_id: 91404[/import]