# Problem resizing movieclip width to stage width dynamically

**URL:** <https://forum.kirupa.com/t/problem-resizing-movieclip-width-to-stage-width-dynamically/323711>\
**Category:** flash\
**Created:** [July 13, 2011, 2:39pm UTC](https://forum.kirupa.com/t/problem-resizing-movieclip-width-to-stage-width-dynamically/323711 "2011-07-13T14:39:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisboggs](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisboggs/32/2183_2.png) [@chrisboggs](https://forum.kirupa.com/u/chrisboggs)\
**Post date:** [July 13, 2011, 2:39pm UTC](https://forum.kirupa.com/t/problem-resizing-movieclip-width-to-stage-width-dynamically/323711/1 "2011-07-13T14:39:38Z")

</div>

Hello all,  
I need a tutorial or suggestion as to how to get a movieclip named “topnav” to resize it’s width to match that of the stage. I am trying to resize the width of a top nav bar across a resizable RIA. I have started with the following code but with only partial success:

```auto

stage.addEventListener(Event.RESIZE, resizeListener);

function resizeListener (e:Event):void {
    var reg2 = stage.stageWidth / 100;
    topnav.scaleX = reg2;

}
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;

```

Basically, all I need to know is why isn’t what I have in the resizeListener function not working? Anyone know how to do this correctly? I sure would appreciate it.
