Reference to addchild in a for loop

pfff…my 3th question about as3 in 2 days…embaressed…

I “attach” movieclips from the library, but I want them to do something when I click something else…

everything works perfect (beside the error you get if you try my code), I just dont know how to refer back to “the other” movieclips…

You have to believe me if I say I tried a zillion different ways…pls tell me how…(did this sounded desperate ? :smiley: )

var ammount:Number = 6;

function make():void {
    //make thumbs
    for (var i:Number = 0; i<ammount; i++) {
        var k:Thumb = new Thumb();//clip in lib with classname Thumb
        k.x = i*20;
        k.y = 75;
        k.name = "Thumb"+i;
        addChild(k);
    }
    loadImg(0);
}
make();




function loadImg(pad:int) {
    for (var z:Number=0; z<ammount; z++) {

        //here Im stuck .... :(
        if (z==pad) {
            getChildByName("Thumb" + z).gotoAndStop(2);//how on earth can I refer to this mc ?
        } else {
            getChildByName("Thumb" + z).gotoAndStop(1);//how on earth can I refer to these mc's ?
        }
    }
}

thx in advance from a guy that dives into his bottle without problems (whiskey ^^ )