Target button in a loop

I have the below code which attaches a movieclip “btn1” to another movie clip within this loop I wish to setup up different functions for each different button but it only lets me set them up for the last one in the line of buttons. How to I target each button seperatly by using a string and then the value of miniLoop? i.e

subnav.test_mc.item1
subnav.test_mc.item2

code--------------------------------

for (var miniLoop=0; miniLoop < imageLength.length; miniLoop++) {
var currentImage = imageLength[miniLoop];
var item_mc = subnav.test_mc.attachMovie(“btn1”,“item”+miniLoop, miniLoop);

            item_mc.onRollOver = function() {
                trace("test");
            }
            
            item_mc.onPress = function() {
                image_mc.loadMovie(this.url);
                trace(miniLoop);
                trace(desc[0]);
            }
            
            item_mc.url = currentImage.attributes.url;
            item_mc._x = miniLoop * subnav_spacing ;
        }