numChildren on Stage

How can you find out the total number of children on the stage?

(AND the children’s children)
I understand that display.getCurrentStage().numChildren returns the number of children on the stage. However it does not show the children of those children.

Any advice? [import]uid: 11632 topic_id: 4044 reply_id: 304044[/import]

presumably you can recurse through the stage children with an index… something like this…

[lua]function listGroup(group)
for i=1,group.numChildren do
local child = group[i]
print(child)
listGroup(child)
end
end

listGroup(stage)[/lua] [import]uid: 6645 topic_id: 4044 reply_id: 12384[/import]

Thanks jmp909! Worked like a charm
[import]uid: 11632 topic_id: 4044 reply_id: 12386[/import]