Tiling full screen resizable background! Help

Im using the following script for a full screen bkg tile:

[COLOR=DarkRed]tileBG = function () {

tile_width = 30;
tile_height = 30;
//
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();[/COLOR]

As Kirupa tutorial [COLOR=Navy]http://www.kirupa.com/developer/mx2004/duplicatebackground.htm[/COLOR],
[COLOR=Gray](It is for Flash MX 2004 does it changes for Flash 8?)[/COLOR]
Now some issues:
1- When the backround is sampled it comes up due to [COLOR=Red]this.getNextHighestDepth() [COLOR=Black]and covers the other animation (im not using levels)[/COLOR]
[COLOR=Black]2- How do I add a listener to this that onResize expands the tile to the new stage size.

Well if someone could help!!
thx to all…
[/COLOR][/COLOR]Ive been braking mi mind for the whole morning, help is very welcomed !!:slight_smile: