Resize issue to fit dynamically with any browser size
- by Qpixo
I'm trying to make full flash site dynamically resize in any browser size.
If the browser gets smaller than the site MC should constrain to fit in the browser. (EX: 1440x900) What I have right now works like 98% of the time, but when I switch to a bigger screen size, it screws up and makes the site tiny from left to right (menu, logo, etc.) (Ex:1680x1050)
Does anyone know how to fix that issue??
positionScenesOnStage();
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, handleObjectsOnStage);
private function handleObjectsOnStage(event:Event):void
{
positionScenesOnStage();
}
private function positionScenesOnStage():void
{
backgroundMC = new bgMC();
backgroundMC.x = 0;
backgroundMC.y = 0;
backgroundMC.width = stage.stageWidth;
backgroundMC.height = stage.stageHeight;
addChild(backgroundMC);
logo_mc = new LogoMC();
logo_mc.x = stage.stageWidth - 1420;
logo_mc.y = stage.stageHeight - 700;
addChild(logo_mc);
menuContainer = new MenuContainerMC();
menuContainer.x = stage.stageWidth - 400;
menuContainer.y = stage.stageHeight - 680;
addChild(menuContainer);
}