Please Help with duplicate background [renamed]

I’ve read the tutorial on duplicate background http://www.kirupa.com/developer/mx2004/duplicatebackground.htm… but I can’t make this work on(press)… here’s the code:

on(press){

tellTarget("_level0.fill"){

tileBG = function () {

tile_width = 100;
tile_height = 100;
//
x_max = Math.round(Stage.width/tile_width);
y_max = Math.round(Stage.height/tile_height);
trace(x_max);
trace(y_max);
for (x=0; x<=x_max; x++) {

for (y=0; y<=y_max; y++) {

bg = _root.attachMovie(“square”, “bg”+x+y, this.getNextHighestDepth());
bg._x = tile_widthx;
bg._y = tile_height
y;

}

}

};
tileBG();

}
}

Further more my movie clip has an irregular shape //how can I make the background fill only that shape?