# Slanted Background Help?

**URL:** https://forum.kirupa.com/t/slanted-background-help/186278
**Category:** flash
**Created:** [April 20, 2006, 7:43am UTC](https://forum.kirupa.com/t/slanted-background-help/186278 "2006-04-20T07:43:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![youwh](https://avatars.discourse-cdn.com/v4/letter/y/82dd89/32.png) [@youwh](https://forum.kirupa.com/u/youwh)
#### Post date: [April 20, 2006, 7:43am UTC](https://forum.kirupa.com/t/slanted-background-help/186278/1 "2006-04-20T07:43:13Z")

</div>

So if I would wanted to create a background with slanted lines like 45 degrees, that stretch along the whole page, how should I do it?

I’ve tried the tutorials in Kirupa, by making a 3px\*3px slanted lines, and make it repeatedly duplicate among the whole page(originally just the stage), but that would make my flash very laggy.

So is there any way that I could make it stetch till the whole page, without using BIG PICTURES.Cause we dont know the screen resolution the user using, and it would also lag if i put a very big graphic at the back.

So any PRO’s out there have any idea how this could be done? :q:

---

<div class="post-metadata">

### Author: ![rhamej](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rhamej](https://forum.kirupa.com/u/rhamej)
#### Post date: [April 21, 2006, 2:05am UTC](https://forum.kirupa.com/t/slanted-background-help/186278/2 "2006-04-21T02:05:31Z")

</div>

Flash 8 has the bitmap data. But in flash 7 or earlier, your kinda out of luck.  
One way to do it is to make the background in the html, then set the movie to be transparent in the publish settings. =)

---

<div class="post-metadata">

### Author: ![jc\_](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@jc\_](https://forum.kirupa.com/u/jc_)
#### Post date: [April 21, 2006, 2:12am UTC](https://forum.kirupa.com/t/slanted-background-help/186278/3 "2006-04-21T02:12:10Z")

</div>

make a square mc named “square”, make it 26 x 26  
draw a slanted lines in it  
make it export in the first frame.  
paste this code in the timeline…

```auto
tileBG = function () {
	mydee = 500;
	tile_width = 26;
	tile_height = 26;
	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 = this.attachMovie("square", "bg"+x+y, mydee);
			bg._x = tile_width*x;
			bg._y = tile_height*y;
			mydee--;
		}
	}
	trace("bg_ready");
};
tileBG();

```
