# Problem with resize function

**URL:** <https://forum.kirupa.com/t/problem-with-resize-function/288536>\
**Category:** flash\
**Created:** [May 17, 2009, 8:48pm UTC](https://forum.kirupa.com/t/problem-with-resize-function/288536 "2009-05-17T20:48:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dimitree](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dimitree/32/2530_2.png) [@Dimitree](https://forum.kirupa.com/u/Dimitree)\
**Post date:** [May 17, 2009, 8:48pm UTC](https://forum.kirupa.com/t/problem-with-resize-function/288536/1 "2009-05-17T20:48:11Z")

</div>

Well I have this code:

```auto
public function addFlow() {
			
for (var i:int=0; i<4; i++) {
// Box is a movieclip exported for actionscript from my library
var box:Box = new Box()
box.x= (yourMC.width)+i*(box.width+100);
box.y = stage.stageHeight-100;		
addChild(box);

```

Which is ok, but when i put into this function :

```auto
public function onStageResize(param1:Event):void {

box.y = stage.stageHeight-100;

}

```

it doesnt seem to work… when I resize the browser the “box” doesnt stick to its “y position”  
Can somebody see the error? :red:
