# Problems with Pattern in Flash8

**URL:** <https://forum.kirupa.com/t/problems-with-pattern-in-flash8/195193>\
**Category:** flash\
**Created:** [July 29, 2006, 1:46pm UTC](https://forum.kirupa.com/t/problems-with-pattern-in-flash8/195193 "2006-07-29T13:46:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bonwhis](https://avatars.discourse-cdn.com/v4/letter/b/b77776/32.png) [@Bonwhis](https://forum.kirupa.com/u/Bonwhis)\
**Post date:** [July 29, 2006, 1:46pm UTC](https://forum.kirupa.com/t/problems-with-pattern-in-flash8/195193/1 "2006-07-29T13:46:48Z")

</div>

Hello again…

I am looking to use a rather simple pattern on a flash page. I would like the pattern to fill the whole browser and then make the main content of my flash site to have transparent effect. Just like seen in this example:

[http://www.websitedesignawards.com/flash.html](http://www.websitedesignawards.com/flash.html)

i have used the following tutorials to get the fullpage effect aswell as the pattern to work.

[http://www.kirupa.com/developer/mx2004/duplicatebackground.htm](http://www.kirupa.com/developer/mx2004/duplicatebackground.htm)  
[http://www.kirupa.com/developer/mx2004/fullscreen.htm](http://www.kirupa.com/developer/mx2004/fullscreen.htm)

The thing is that I can’t get the pattern to be on the bottom. Everytime I apply the actionscript to the main timeline the pattern is placed above everything else.

tileBG = function () {  
tile\_width = 180;  
tile\_height = 180;  
x\_max = Math.round(Stage.width/tile\_width);  
y\_max = Math.round(Stage.height/tile\_height);  
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;  
}  
}  
};  
onEnterFrame=tileBG;

I have tried to make a seperate movieclip that loads in, the pattern with the actionscript on that timeline, but then the pattern does not load at all.

Does anyone know what I can do, or where I can find a tutorial showing how to apply a background wallpaper, without having to do it in CSS?

Thank you so much guys…

-BonWhis
