# \[AS 2.0\] help.. liquid layout

**URL:** <https://forum.kirupa.com/t/as-2-0-help-liquid-layout/247211>\
**Category:** Uncategorized\
**Created:** [December 19, 2007, 5:27pm UTC](https://forum.kirupa.com/t/as-2-0-help-liquid-layout/247211 "2007-12-19T17:27:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yiddo1](https://avatars.discourse-cdn.com/v4/letter/y/54ee81/32.png) [@yiddo1](https://forum.kirupa.com/u/yiddo1)\
**Post date:** [December 19, 2007, 5:27pm UTC](https://forum.kirupa.com/t/as-2-0-help-liquid-layout/247211/1 "2007-12-19T17:27:09Z")

</div>

I was a bit tired this morning so I posted my question in the wrong forum (sorry) so I’ll post it here.

What I want is something similar to [http://www.hampusolsson.com/start/flash.html](http://www.hampusolsson.com/start/flash.html)  
If you resize your browser you’ll see that the background image rescale while the content stay in place and size.

Don’t know if it helps but the script looks like this in AS 3.0:

```auto
[FONT=Courier New][LEFT][COLOR=#0000ff]stage[/COLOR].[COLOR=#0000ff]scaleMode[/COLOR] = StageScaleMode.[COLOR=#000080]NO_SCALE[/COLOR];
[COLOR=#0000ff]stage[/COLOR].[COLOR=#0000ff]align[/COLOR] = StageAlign.[COLOR=#000080]TOP_LEFT[/COLOR];

pic.[COLOR=#000080]x[/COLOR] = [COLOR=#000080]0[/COLOR];
pic.[COLOR=#000080]y[/COLOR] = [COLOR=#000080]0[/COLOR];
pic.[COLOR=#0000ff]width[/COLOR] = [COLOR=#0000ff]stage[/COLOR].[COLOR=#000080]stageWidth[/COLOR];
pic.[COLOR=#0000ff]height[/COLOR] = [COLOR=#0000ff]stage[/COLOR].[COLOR=#000080]stageHeight[/COLOR];

[COLOR=#0000ff]stage[/COLOR].[COLOR=#000080]addEventListener[/COLOR][COLOR=#000000]([/COLOR]Event.[COLOR=#000080]RESIZE[/COLOR], onStageResize[COLOR=#000000])[/COLOR];

[COLOR=#000000] **function** [/COLOR] onStageResize[COLOR=#000000]([/COLOR]event:Event[COLOR=#000000])[/COLOR]:[COLOR=#0000ff]void[/COLOR]
[COLOR=#000000]{[/COLOR]
    pic.[COLOR=#0000ff]width[/COLOR] = [COLOR=#0000ff]stage[/COLOR].[COLOR=#000080]stageWidth[/COLOR];
    pic.[COLOR=#0000ff]height[/COLOR] = [COLOR=#0000ff]stage[/COLOR].[COLOR=#000080]stageHeight[/COLOR];
[COLOR=#000000]}[/COLOR]
[/LEFT]
[/FONT]

```

I need it to work in AS 2.0 please

Thanks  
//Simon
