# Liquid Layout inside of MC issue

**URL:** https://forum.kirupa.com/t/liquid-layout-inside-of-mc-issue/280081
**Category:** flash
**Created:** [January 22, 2009, 12:36pm UTC](https://forum.kirupa.com/t/liquid-layout-inside-of-mc-issue/280081 "2009-01-22T12:36:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Terraform](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@Terraform](https://forum.kirupa.com/u/Terraform)
#### Post date: [January 22, 2009, 12:36pm UTC](https://forum.kirupa.com/t/liquid-layout-inside-of-mc-issue/280081/1 "2009-01-22T12:36:27Z")

</div>

I have all of my content inside of a movie clip placed on my stage  
and through timeline AS 3 I have a simple scripting that aligns and  
sizes that MC (and all of its contents) to keep proportion with the stage  
and to fill it at all times

I am having 2 issues

after the preloader, and intro play  
the content for the gallery pages (it is a photo website) clips the buttons  
down at the bottom (all dependent on browser size at the time) however once the window is resized, it Snaps into a proportion that I like.

the second issue is more than likely related.

the mc that I am using as the background (ecru texture) does not fit to fill  
once the screen has been resized I have minimized the noticeability by changing the background color to come close to my texture but I would like to know why these issues are happening.

here is the development page  
[http://www.andybarnesphotography.com/dev3/](http://www.andybarnesphotography.com/dev3/)

this is my main timeline code  
////////////////////////////////

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

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

//function to handle background image resize.  
function setBackground() {  
var reg2 = stage.stageWidth / 2;  
var reg1 = stage.stageHeight / 2;  
bg\_mc.x = reg2;  
bg\_mc.y = reg1;  
bg\_mc.width = stage.stageWidth;  
bg\_mc.height = stage.stageHeight;  
bg\_mc.scaleX \<= bg\_mc.scaleY ? (bg\_mc.scaleX = bg\_mc.scaleY) : (bg\_mc.scaleY = bg\_mc.scaleX);

}  
setBackground();

function resizeHandler(event:Event):void {  
setBackground();

}  
/////////////////////////////////////////

I would like to learn how to do this “Correctly” as I have several personal projects  
that I would like to use

- a proportionally scaled background (both .flv and mc)
- a main timeline navigation system
- integration of components (mainly slideshowpro) and mc interactivity.

all the tutorials I have found are either way more complicated then I need or are to “specific”  
to the point they are difficult to modify

on top of wanting to find the answers to my MC issue listed above  
any advice on learning more about the appropriate ways of liquid layout would be appreciated.
