Trouble with loops

I am having trouble using for loops to place multiple objects in various places. It always seems to just do the last one in the loop.

This is the code:

buildMenu = function(){
    _root.createEmptyMovieClip("menu_exp",getNextHighestDepth());
    for (i=0;i<urls.length;i++){
        menu_exp.attachMovie("thumb",["thumb"+i],getNextHighestDepth());
        [thumb+i]_y = i*100;
        [thumb+i]_x = 150;
    }
        menu_exp.thumb1.loadMovie(thumbs[1],getNextHighestDepth());
}

I’ve tried various different ways to try and get it to work and all of them just do the same thing, just make the last one in the loop. It’s as if they are all being placed in the same depth and therefore getting overwritten.

Please help!

edit: Argh I put it in the wrong actionscript forum! I’m not used to there being a separate one for AS3 yet … sorry about that.