# Reszable masked background

**URL:** <https://forum.kirupa.com/t/reszable-masked-background/285297>\
**Category:** flash\
**Created:** [March 30, 2009, 8:17am UTC](https://forum.kirupa.com/t/reszable-masked-background/285297 "2009-03-30T08:17:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marvinnr1](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@marvinnr1](https://forum.kirupa.com/u/marvinnr1)\
**Post date:** [March 30, 2009, 8:17am UTC](https://forum.kirupa.com/t/reszable-masked-background/285297/1 "2009-03-30T08:17:43Z")

</div>

Hi,

I’m working on a short flash movie where I want to mask the background picture with a script. Basically I want the movie maskbg of 30x30 pix scaled to fullscreen (the whole screen).  
I already tried several thing, but nothing seems to be working.

Below you can see the AS I’ve used

```auto
Stage.scaleMode = "noScale";
Stage.align = "TL";
stageResize = function () {
    background_mc._x = 0;
    background_mc._y = 0;
    background_mc._width = Stage.width;
    background_mc._height = Stage.height;
	    footer._y = Stage.height - footer._height
	    footer._x = 0
	    footer._width = Stage.width
	    maskbg._y = Stage.height / 2 - maskbg._height / 2;
    maskbg._x = Stage.width / 2 - maskbg._width / 2;
};
stageResize();
var stageListener:Object = new Object();
stageListener.onResize = function() {
	stageResize();
};
Stage.addListener(stageListener);

import mx.transitions.Tween ; 
import mx.transitions.easing.*;

var xscaleT:Tween = new Tween(maskbg, "_xscale", Strong.easeOut, 0, 100, 5, true); 
var yscaleT:Tween = new Tween(maskbg, "_yscale", Strong.easeOut, 0, 100, 5, true);

```

Thanks  
Marvin
