# \-CS3- Having trouble with resizing boxes

**URL:** <https://forum.kirupa.com/t/cs3-having-trouble-with-resizing-boxes/248928>\
**Category:** flash\
**Created:** [January 13, 2008, 3:22pm UTC](https://forum.kirupa.com/t/cs3-having-trouble-with-resizing-boxes/248928 "2008-01-13T15:22:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![birdboy0103](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@birdboy0103](https://forum.kirupa.com/u/birdboy0103)\
**Post date:** [January 13, 2008, 3:22pm UTC](https://forum.kirupa.com/t/cs3-having-trouble-with-resizing-boxes/248928/1 "2008-01-13T15:22:43Z")

</div>

'Morning guys,

I’ve got a box I drew in actionscript, and I setup a stage resizer to resize the box when the stage’s size changes. This all works like I wanted it to.

The problem is, when you resize, there is a ghost image left behind of the line’s old version when it is redrawn.

Any ideas? :shifty:

Thanks, people.

oh, and here’s my source (twix is the name of the box):

```auto
var resized:Object = new Object();
resized.onResize = function() {
	twix._visible=false;
	twix._width=Stage.width-12;
	twix._height=Stage.height-12;
	twix._x = (Stage.width/2)-twix._width/2;
	twix._y = (Stage.height/2)-twix._height/2;
	updateAfterEvent(); //I tried this to update the screen
	twix._visible=true; // this too.
};
Stage.align = "TL";
Stage.addListener(resized);
Stage.scaleMode = "noScale";

```
