Instances and Variables

I have a .as file with all my code etc in it, and a setup of movieclips (all correctly named) on the corresponding .fla file. How can I access a nested movieclip in a repeating loop? I’ve seen things such as ‘just use an array’ (that returns coercion of String) or 'use this[blah] (which expects a definition). There has to be a simple way of doing this, but I can’t find it. Any help?

Code I have now is:

function LegendSetup() {
for (var i:int=1; i<=$NumLegendButtons; i++) {
$LegendCompiler = “mci_Legend.mci_LI” + i + “.bi_LB” + i;
MovieClip(root).mci_Legend.$LegendCompiler.alpha=0;
}
}