# Full screen tiling working, but not working right?

**URL:** <https://forum.kirupa.com/t/full-screen-tiling-working-but-not-working-right/269064>\
**Category:** Uncategorized\
**Created:** [August 22, 2008, 2:32am UTC](https://forum.kirupa.com/t/full-screen-tiling-working-but-not-working-right/269064 "2008-08-22T02:32:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jibble](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jibble/32/2265_2.png) [@jibble](https://forum.kirupa.com/u/jibble)\
**Post date:** [August 22, 2008, 2:32am UTC](https://forum.kirupa.com/t/full-screen-tiling-working-but-not-working-right/269064/1 "2008-08-22T02:32:15Z")

</div>

am using bitmapdata to make me a nice lil’ background image, and it works great…until it’s resized. Whats happening is it’s creating a new bgHolder clip on the resize, NOT resizing the current empty clip “bgHolder”

Here’s the code(taken from various posts)

import flash.display.BitmapData;  
#include “mc\_tween2.as”  
Stage.align = “TL”;  
Stage.scaleMode = “noScale”;  
var myListener:Object = new Object();  
myListener.onResize = function() {  
createBG();  
};  
Stage.addListener(myListener);  
var bgHolder:MovieClip = \_root.createEmptyMovieClip(“bgHolder”, \_root.getNextHighestDepth());  
var BG\_LINKAGE:String = “bg”;  
function createBG():Void {  
var tile:BitmapData = BitmapData.loadBitmap(BG\_LINKAGE);  
with (bgHolder) {  
beginBitmapFill(tile);  
moveTo(0,0);  
lineTo(Stage.width,0);  
lineTo(Stage.width,Stage.height);  
lineTo(0,Stage.height);  
lineTo(0,0);  
endFill();  
}  
}  
createBG();
