# \[Flash 8 / AS2 Help Needed\] Problem with liquid layout / floating movie clips

**URL:** https://forum.kirupa.com/t/flash-8-as2-help-needed-problem-with-liquid-layout-floating-movie-clips/265675
**Category:** flash
**Created:** [July 11, 2008, 8:32am UTC](https://forum.kirupa.com/t/flash-8-as2-help-needed-problem-with-liquid-layout-floating-movie-clips/265675 "2008-07-11T08:32:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ben3](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@ben3](https://forum.kirupa.com/u/ben3)
#### Post date: [July 11, 2008, 8:32am UTC](https://forum.kirupa.com/t/flash-8-as2-help-needed-problem-with-liquid-layout-floating-movie-clips/265675/1 "2008-07-11T08:32:29Z")

</div>

Morning guys,

I’ve been playing around with liquid layouts with some success. I want to float an element (mclogo) to the right side of the browser, so when the browser is re-sized the logo sticks to the right.

I want the logo to stop floating and become static once the browser becomes too small. I’ve used a loop to check the position, and whilst this kind of works, while the browser is being re-sized past the point where I want the logo to become fixed, the logo constantly jumps from floating to the position I’ve set.

Hope that makes sense, any help is much appreciated.

Code:

Stage.align = “TL”;

// Stop the stage from scaling with the browser window  
Stage.scaleMode = “noScale”;  
stop ();

// Initiate positions and scaling values for objects  
bottomstretch.\_height = Stage.height;  
rightstretch.\_height = Stage.height;  
topstretch.\_width = Stage.width;  
mclogo.\_x = Stage.width - mclogo.\_width;

// End initial position setting

// Create a listener that checks to see if the browser window is resized  
sizeListener = new Object();  
sizeListener.onResize = function() {

```
// Change movieclip properties when the window is resized.
topstretch._width = Stage.width;
bottomstretch._height = Stage.height;
rightstretch._height = Stage.height;

if(mclogo._x &gt;= 738){
    mclogo._x = Stage.width - mclogo._width;
} 
else mclogo._x = 738;

//mclogo._x = Stage.width - mclogo._width;

```

};  
Stage.addListener(sizeListener);
