# Auto resize flash help

**URL:** <https://forum.kirupa.com/t/auto-resize-flash-help/298454>\
**Category:** flash\
**Created:** [October 19, 2009, 1:40pm UTC](https://forum.kirupa.com/t/auto-resize-flash-help/298454 "2009-10-19T13:40:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rboyart](https://avatars.discourse-cdn.com/v4/letter/r/a4c791/32.png) [@rboyart](https://forum.kirupa.com/u/rboyart)\
**Post date:** [October 19, 2009, 1:40pm UTC](https://forum.kirupa.com/t/auto-resize-flash-help/298454/1 "2009-10-19T13:40:11Z")

</div>

Hello!

Im trying to make a website in AS3 with a dynamic background-video that fills all the page in my browser and keeps the proportions even if you are resizing the browser

like this:

[http://www.luxdesign.com/](http://www.luxdesign.com/)  
[http://www.1001reves.com/site/](http://www.1001reves.com/site/)

its almost working but i dont know what to do to force to keep the proportions of my movieClip and at the same, to fill 100% of my page

This is my code…

I have a movieClip with the instance name: “bg”.

///////

import flash.display.StageAlign;  
import flash.display.StageScaleMode;  
import flash.events.Event;

stage.align = StageAlign.TOP\_LEFT;  
stage.scaleMode = StageScaleMode.NO\_SCALE;  
stage.addEventListener(Event.RESIZE, resizeHandler);

stage.dispatchEvent(new Event(Event.RESIZE));

function resizeHandler(e:Event):void  
{  
bg.width = stage.stageWidth;  
bg.height = stage.stageHeight;  
}  
 ![](http://www.flashxpress.net/forum/images/misc/progress.gif)

Thanks for all your help! :)[URL=“[http://www.flashxpress.net/forum/editpost.php?do=editpost&p=519871](http://www.flashxpress.net/forum/editpost.php?do=editpost&p=519871)”]
