Q. About Duplicate Background Tut

If for eg. we have the stage set to 100% with noscale.How can i duplicate the mc across the full width of the movie.

I thought that Stage.width would do this, but i was wrong ;(

Can anybody help pls?
This is Kirupa’s original source

function tileBG () {
tile_width = 34;
tile_height = 34;
// 
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_width * x;
bg._y = tile_height * y;
}
}
}
tileBG ();