# Please Help with duplicate background \[renamed\]

**URL:** <https://forum.kirupa.com/t/please-help-with-duplicate-background-renamed/163041>\
**Category:** flash\
**Created:** [September 19, 2005, 9:52am UTC](https://forum.kirupa.com/t/please-help-with-duplicate-background-renamed/163041 "2005-09-19T09:52:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![awholeuniverse](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@awholeuniverse](https://forum.kirupa.com/u/awholeuniverse)\
**Post date:** [September 19, 2005, 9:52am UTC](https://forum.kirupa.com/t/please-help-with-duplicate-background-renamed/163041/1 "2005-09-19T09:52:46Z")

</div>

I’ve read the tutorial on duplicate background [http://www.kirupa.com/developer/mx2004/duplicatebackground.htm](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\_width_x;  
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?
