# Help with scaling and borders with a tiled bg

**URL:** <https://forum.kirupa.com/t/help-with-scaling-and-borders-with-a-tiled-bg/249193>\
**Category:** flash\
**Created:** [January 16, 2008, 12:38pm UTC](https://forum.kirupa.com/t/help-with-scaling-and-borders-with-a-tiled-bg/249193 "2008-01-16T12:38:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![12\_51](https://avatars.discourse-cdn.com/v4/letter/1/e47c2d/32.png) [@12\_51](https://forum.kirupa.com/u/12_51)\
**Post date:** [January 16, 2008, 12:38pm UTC](https://forum.kirupa.com/t/help-with-scaling-and-borders-with-a-tiled-bg/249193/1 "2008-01-16T12:38:54Z")

</div>

i hope some one can help i created a flash document and then added a tiled background to the atage using this code  
import flash.display.BitmapData;  
var tile:BitmapData = BitmapData.loadBitmap(“kpattern2”);  
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();

but i am unable to place a border around the stage and unable to place the satge in the centre of the page when viewed in the browser can anyone help please
