I have a site I'm working that uses a liquid layout. It works good, except when the size of the browser is too small, everything gets squished. I'm trying to have the resize handler basically stop at a certain point so it doesn't do that.
The way I'm trying to do it is with the following code:
Code:
function resizeHandler(event:Event):void {
if ((stage.stageWidth > 800) && (stage.stageHeight > 700)) {
// Logo
top_mc.x = stage.stageWidth / 2;
top_mc.y = 0;
// Navigation
nav_mc.x = stage.stageWidth / 2;
nav_mc.y = stage.stageHeight * .26;
// Middle Content
middle_mc.x = stage.stageWidth / 2;
middle_mc.y = stage.stageHeight * .62;
// Footer
footer_mc.x = stage.stageWidth / 2;
footer_mc.y = stage.stageHeight - 5;
}
}
This works fine, except scrollbars do not appear when the site is too small to all fit in the browser?
Is there a better to go about this? Any help would be appreciated.