Acessing the stage

I need to know the elements on the stage. I’m creating textfields and don’t know how to access them.
in as 1 and 2 all I needed to do would be a

for (var a in _root){
do something
}

what should I do to do something like this???

Thank you in advance!

jm