# lashCS3 Actionscript 2.0 - Tiling

**URL:** <https://forum.kirupa.com/t/lashcs3-actionscript-2-0-tiling/267146>\
**Category:** flash\
**Created:** [July 29, 2008, 3:09am UTC](https://forum.kirupa.com/t/lashcs3-actionscript-2-0-tiling/267146 "2008-07-29T03:09:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![erincam](https://avatars.discourse-cdn.com/v4/letter/e/a9adbd/32.png) [@erincam](https://forum.kirupa.com/u/erincam)\
**Post date:** [July 29, 2008, 3:09am UTC](https://forum.kirupa.com/t/lashcs3-actionscript-2-0-tiling/267146/1 "2008-07-29T03:09:22Z")

</div>

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](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\_width_i;  
tile.\_y = tile\_height_j;  
layer++;  
}  
}  
}  
tileBkg();
