# Fluid Layout and Photo Gallery problem

**URL:** <https://forum.kirupa.com/t/fluid-layout-and-photo-gallery-problem/316964>\
**Category:** flash\
**Created:** [December 7, 2010, 12:37am UTC](https://forum.kirupa.com/t/fluid-layout-and-photo-gallery-problem/316964 "2010-12-07T00:37:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![strawberry](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@strawberry](https://forum.kirupa.com/u/strawberry)\
**Post date:** [December 7, 2010, 12:37am UTC](https://forum.kirupa.com/t/fluid-layout-and-photo-gallery-problem/316964/1 "2010-12-07T00:37:25Z")

</div>

I am using a fluid flash layout for my flash movie…but the flash gallery I am using it is not displayed correctly…the images appears to be “zoomed in”…can someone help me fix this? I know it has something to do with the movieclip mcBackground width and height  
The main movie clip on the timeline is mcStage, then inside I have mcBackground and inside mcBackground I have the gallery movie clip…

Here is the code I am using…hope someone can help me figure this out…

```auto

// 1: import the Delegate class to deal with event function scope
import mx.utils.Delegate;
// 2: set the Stage class params
Stage.scaleMode = "noScale";
Stage.align = "C"; // to centre the stage
// 3: Assign the dimensions of the document
// to the Movie object (same as FLA):
var Movie:Object = new Object();
Movie.width = 1100;
Movie.height = 556;
// 4: create function to position your MC at the top-left of the stage
function positionStageMC():Void {
 /* note: because we are using Delegate, the scope of this function
  is mcStage, and not "slistener"
 */
 // position mcStage (this)
 this._x = (Movie.width/2)-(Stage.width/2);
 this._y = (Movie.height/2)-(Stage.height/2);
 
 // position & size background
 this.mcBackground._width = Stage.width - mcBackground.width;
 this.mcBackground._height = Stage.height - mcBackground.height;
}
// 5: initialize mcStage position
positionStageMC();
// 6: create an onResize event which calls positionStageMC()
// when the stage is resized.
var slistener:Object = new Object();
slistener.onResize = Delegate.create(this, positionStageMC);
Stage.addListener(slistener);
 

```
