How do I get an AS list of movie objects?

I saw in a post a while back (which I am unable to find) that someone was able to write code to loop through specific objects in the main movie. For instance, if there were 10 buttons on the main page, the code would allow dynamic access to the buttons without actually knowing the instance straight out. I thought it looped through an array like _root* or something and checked to see if the object was a button or not. I could be way off, but can anyone help me with this? I want to setup 4 empty movieclips and just want to make them totally dynamic in their loading.