# Black bar with stage.stageWidth

**URL:** <https://forum.kirupa.com/t/black-bar-with-stage-stagewidth/284102>\
**Category:** Uncategorized\
**Created:** [March 15, 2009, 10:33am UTC](https://forum.kirupa.com/t/black-bar-with-stage-stagewidth/284102 "2009-03-15T10:33:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![torylon](https://avatars.discourse-cdn.com/v4/letter/t/e99b99/32.png) [@torylon](https://forum.kirupa.com/u/torylon)\
**Post date:** [March 15, 2009, 10:33am UTC](https://forum.kirupa.com/t/black-bar-with-stage-stagewidth/284102/1 "2009-03-15T10:33:22Z")

</div>

Hey again folks.

I’ve fixed all my problems so far but their is 1 problem that I cant seem to solve. My scale script is working but now I got this black bar on the right side of the screen(swf or browser) wich won’t go away. So it scale’s full screen yes, but with a black bar on 1 side, so it still aint full screen ;/.

Actionscript wich causes it (im pretty sure) :

stage.align = StageAlign.TOP\_LEFT;  
stage.scaleMode = StageScaleMode.NO\_SCALE;

stage.addEventListener( Event.ENTER\_FRAME, orly);

function orly( event:Event ):void

{

```
my_tg2.width = stage.stageWidth ;
my_tg2.height = stage.stageHeight ;

```

}

stage.addEventListener( Event.RESIZE, handleResize );

function handleResize( event:Event ):void

{

```
my_tg2.width = stage.stageWidth ;
my_tg2.height = stage.stageHeight;

```

}

Yes I got 2 scripts doing the same thing pretty much, but the RESIZE event make’s the blackbar appear when I resize, so I added the ENTER\_FRAME script so the blackbar is visible even when you don’t resize. ( for personal use atm) So when I located the problem of the blackbar ill remove the ENTER\_FRAME script.

So the problem is somewhere in the my\_tg2.width = stage.stageWidth ; code, probarly has to do with the stage, I traced the stage and the output is exactly the stage i’ve setted so im pretty hopeless atm.

I really hope you can help me out on this one,  
thanks.
