Resize issue to fit dynamically with any browser size
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(l开发者_运维技巧ogo_mc);
menuContainer = new MenuContainerMC();
menuContainer.x = stage.stageWidth - 400;
menuContainer.y = stage.stageHeight - 680;
addChild(menuContainer);
}
for the browser flash invocation code you need to add the params:
<param name="scale" value="noscale" />
<param name="salign" value="lt" />
plus the corresponding settings in the embed tag and if you use javascript to invoke the flash add to that as well.
精彩评论