# Re: How do I create a liquid smooth scalable bitmap background?

**URL:** <https://forum.kirupa.com/t/re-how-do-i-create-a-liquid-smooth-scalable-bitmap-background/236551>\
**Category:** flash\
**Created:** [August 21, 2007, 8:13pm UTC](https://forum.kirupa.com/t/re-how-do-i-create-a-liquid-smooth-scalable-bitmap-background/236551 "2007-08-21T20:13:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![urbanhumor](https://avatars.discourse-cdn.com/v4/letter/u/919ad9/32.png) [@urbanhumor](https://forum.kirupa.com/u/urbanhumor)\
**Post date:** [August 21, 2007, 8:13pm UTC](https://forum.kirupa.com/t/re-how-do-i-create-a-liquid-smooth-scalable-bitmap-background/236551/1 "2007-08-21T20:13:56Z")

</div>

Hi,

I’m trying to mimic the behavior of the [http://www.interpolnyc.com/](http://www.interpolnyc.com/) where the bitmap in the background scales smoothly to the browser size but the other elements don’t move. i was able to make a .swf where the image tiled as the browser scaled but i don’t want this. i want one bitmap to smoothly scale as the other elements remain fixed.

I know i need to adjust the fillBG function, any help is much appreciated!

Here’s my code:

```auto

import flash.display.BitmapData;
    text._x = 400;
    text._y = 100;
    
var hurricane:BitmapData = BitmapData.loadBitmap("hurricane");

function fillBG(){
    this.beginBitmapFill(hurricane);
    this.moveTo(0,0);
    this.lineTo(Stage.width, 0);
    this.lineTo(Stage.width, Stage.height);
    this.lineTo(0, Stage.height);
    this.lineTo(0,0);
    this.endFill();
}

fillBG();

var stageL:Object = new Object();

stageL.onResize = function(){
        fillBG();
        text._x = 400;
        text._y = 100;
}
   

```
