# Allowing background scaling, content not

**URL:** <https://forum.kirupa.com/t/allowing-background-scaling-content-not/57726>\
**Category:** Uncategorized\
**Created:** [July 15, 2004, 5:33pm UTC](https://forum.kirupa.com/t/allowing-background-scaling-content-not/57726 "2004-07-15T17:33:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandao](https://avatars.discourse-cdn.com/v4/letter/b/5fc32e/32.png) [@brandao](https://forum.kirupa.com/u/brandao)\
**Post date:** [July 15, 2004, 5:33pm UTC](https://forum.kirupa.com/t/allowing-background-scaling-content-not/57726/1 "2004-07-15T17:33:25Z")

</div>

I want to use a gradient as background for my flash movie, but I want this background to cover the whole browser’s window just like Adopt Design does it (check out [Adopt Design](http://www.adoptdesign.com)). The content of the flash movie should NOT be resizable with the browser’s window though. So, I used this code:

fscommand(“fullscreen”, “false”);  
fscommand(“allowscale”, “false”);  
Stage.scaleMode = “noScale”;  
sizer = new Object();  
sizer.onResize = function() {  
\_root.bg.\_width = Stage.width;  
\_root.bg.\_height = Stage.height;  
\_root.bg.\_x = -((Stage.width-780)/2);  
\_root.bg.\_y = -((Stage.height-540)/2);  
};  
Stage.addListener(sizer);

in the HTML file I did set the margins to 0pix and the SWF’s height and width to 100%.

But when I type in the address in the browser to open the page the first time, I see the flash movie in the center with white background around it anyway, and when I resize the browser’s window (even if just 1pix) everything is perfect. What’s happening?

check the problem in a JPG:

![](http://forum.kirupa.com/uploads/kirupa/646/0725cdd2526a89e1.jpg)

the site (notice what changes when you resize the window, after opening)

[www.antoniobrandao.com/meira/](http://www.antoniobrandao.com/meira/)

☹

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 15, 2004, 5:40pm UTC](https://forum.kirupa.com/t/allowing-background-scaling-content-not/57726/2 "2004-07-15T17:40:12Z")

</div>

You’re only looking for the resize with your listener, you might want to do the same thing for onLoad. I think that should fix the problem…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 15, 2004, 6:06pm UTC](https://forum.kirupa.com/t/allowing-background-scaling-content-not/57726/3 "2004-07-15T18:06:58Z")

</div>

Thanks, I did already add the onLoad function…!

But you didnt say if, that what you see in the picture, does it happen to you too?

When I visit the page I still get my error. I erased all my cache but in my windows 2000 I can never be sure.

check it for me please! If it is working there, its done! 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 15, 2004, 9:35pm UTC](https://forum.kirupa.com/t/allowing-background-scaling-content-not/57726/4 "2004-07-15T21:35:06Z")

</div>

Hmmm still shows up like the picture till I resize the browser, can you post the fla, if you’re worried about it getting stolen you can pm it to me, or attach it to an email to me shawn[at]veuphoria[dot]com

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 4:16am UTC](https://forum.kirupa.com/t/allowing-background-scaling-content-not/57726/5 "2004-07-19T04:16:14Z")

</div>

Hi…

I am a Noob To this flash, I actually bother by my webby not being able to resize according to the user resolution.

So, how do I actually go about it, so that my webby can automactically resize according to user screen. Also, how do I centralised it??

Thanks…
