lashCS3 Actionscript 2.0 - Tiling

I am have this action script that tiles thumbnail images across the page. If i increase the window size the tile increases also. I want to limit the number of thumbnails that tile accross horizontally. im not sure how i do this and if this is the only section of the scripy i need to change the info in. Can any one help out? Here is a link to the flash file with the actionscript. http://www.yousendit.com/download/Q0...cWZwaFJFQlE9PQ

And the particular part that i am thinking is what needs to be change is below:

function tileBkg() {
attachMovie(“tile”, “t”, this.getNextHighestDepth());
t._alpha=0;
tile_width=t._width;
tile_height=t._height;
t.removeMovieClip();
if(!this.backgroundMC) this.createEmptyMovieClip(“backgroundMC”,this.getN extHighestDepth()); // temporary - only for detect size of tile
x_max = Math.round(Stage.width/tile_width);
y_max = Math.round(Stage.height/tile_height);
layer=1;
for (i=0; i<=x_max; i++) { // if you want only x tiling (not y) set y_max=0;
for (j=0; j<=y_max; j++) {
tile = backgroundMC.attachMovie(“tile”, “tile”+i+j, layer);
tile._x = tile_widthi;
tile._y = tile_height
j;
layer++;
}
}
}
tileBkg();