# Resizing Tiled Background in Flash 8

**URL:** <https://forum.kirupa.com/t/resizing-tiled-background-in-flash-8/225173>\
**Category:** flash\
**Created:** [May 9, 2007, 12:01pm UTC](https://forum.kirupa.com/t/resizing-tiled-background-in-flash-8/225173 "2007-05-09T12:01:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AJSimpson](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@AJSimpson](https://forum.kirupa.com/u/AJSimpson)\
**Post date:** [May 9, 2007, 12:01pm UTC](https://forum.kirupa.com/t/resizing-tiled-background-in-flash-8/225173/1 "2007-05-09T12:01:47Z")

</div>

Hello,

I’ve checked out this tutorial, and it’s great:

[http://www.kirupa.com/developer/flash8/tiledbackground\_flash8.htm](http://www.kirupa.com/developer/flash8/tiledbackground_flash8.htm)

But, is there a way, to make the background scale, when you resize the movie. I made this AS code:

```auto
import flash.display.BitmapData;
var tile:BitmapData = BitmapData.loadBitmap("pattern");
this.beginBitmapFill(tile);
this.lineTo(Stage.width, 0);
this.lineTo(Stage.width, Stage.height);
this.lineTo(0, Stage.height);
this.lineTo(0, 0);
this.endFill();
//-----------------------
sizeListener = new Object();
sizeListener.onResize = function() {
var tile:BitmapData = BitmapData.loadBitmap("pattern");
this.beginBitmapFill(tile);
this.lineTo(Stage.width, 0);
this.lineTo(Stage.width, Stage.height);
this.lineTo(0, Stage.height);
this.lineTo(0, 0);
this.endFill();
};
Stage.addListener(sizeListener);

```

But it doesn’t work… ☹ I’m confused, what should I do?..
