# Full background and centering content (with ratio) : problem!

**URL:** <https://forum.kirupa.com/t/full-background-and-centering-content-with-ratio-problem/305361>\
**Category:** Uncategorized\
**Created:** [February 24, 2010, 1:36am UTC](https://forum.kirupa.com/t/full-background-and-centering-content-with-ratio-problem/305361 "2010-02-24T01:36:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![grosbouff](https://avatars.discourse-cdn.com/v4/letter/g/7c8e57/32.png) [@grosbouff](https://forum.kirupa.com/u/grosbouff)\
**Post date:** [February 24, 2010, 1:36am UTC](https://forum.kirupa.com/t/full-background-and-centering-content-with-ratio-problem/305361/1 "2010-02-24T01:36:47Z")

</div>

Hi guys.  
I have a big problem here and no more hairs now… 🙂

Could anyone help ?

So; I would like to have a project where the background fits the whole window (can squeeze) and the content is automatically resized and centered; keeping its ratio.

I found this tutorial which is exactly what i’m searching for :  
[Auto-Resizing and Centering your Content](http://www.kirupa.com/developer/as3/resizing_centering_as3.htm)

But here’s my problem :

My main project is 1400_900px.  
My MC to handle is 1000_680px.

I load an external SWF in that MC (with addChild).  
This external SWF is 1000\*680px too (same size than parent).

I have a lot of clips in my external SWF and some of them are “out” the project zone.  
So when I load it in my MC; the MC is no more 1000\*680 but more.  
I thought that what was outside didn’t matter; but it seems that flash do not ignore what is out.

So, when I use the code to resize/recenter the MC; it broke as it do not center as it should.  
I did try to use masks but it do the same.

Does anybody knows a solution to bypass this problem ?

Thanks A LOT !
