# Fill background problem

**URL:** <https://forum.kirupa.com/t/fill-background-problem/206650>\
**Category:** Uncategorized\
**Created:** [November 10, 2006, 1:31am UTC](https://forum.kirupa.com/t/fill-background-problem/206650 "2006-11-10T01:31:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cyber\_rio](https://avatars.discourse-cdn.com/v4/letter/c/a87d85/32.png) [@cyber\_rio](https://forum.kirupa.com/u/cyber_rio)\
**Post date:** [November 10, 2006, 1:31am UTC](https://forum.kirupa.com/t/fill-background-problem/206650/1 "2006-11-10T01:31:01Z")

</div>

I created this actionscripts but the problem is that when I click the bt1 (button 1) the function does not runs completely … I know that I am doing something wrong but I don’t know what.

Tile (image)is the linkage of one of the patterns and office is another image.  
bckg is a movieclip that for some reason I had to create to be able to see the buttons.  
I create three buttons in the first layer, and in the second layer I only put this actions on the frame.

Here is the Actionscript:

///

Stage\_w = Stage.width;  
Stage\_h = Stage.height;  
/// class imported ///

import flash.display.BitmapData;  
import flash.geom.Point;

var tile = BitmapData.loadBitmap(“tile”);

var office:BitmapData = BitmapData.loadBitmap(“office”);

function fillBG() {  
this.beginBitmapFill(tile);  
this.moveTo(0, 0);  
this.lineTo(Stage\_w, 0);  
this.lineTo(Stage\_w, Stage\_h);  
this.lineTo(0, Stage\_h);  
this.lineTo(0, 0);  
this.endFill();  
}  
fillBG();

bckg.attachBitmap(tile,1);

var nextNum:Number = 0;

bt1.onRelease = function():Void{  
nextNum = tile.pixelDissolve(office, tile.rectangle, point,nextNum,5000,0x000000);

}

THANKS
