# SWFobject - Getting site to fill window?

**URL:** <https://forum.kirupa.com/t/swfobject-getting-site-to-fill-window/286642>\
**Category:** web dev\
**Created:** [April 18, 2009, 5:11am UTC](https://forum.kirupa.com/t/swfobject-getting-site-to-fill-window/286642 "2009-04-18T05:11:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbrf23](https://avatars.discourse-cdn.com/v4/letter/c/d26b3c/32.png) [@cbrf23](https://forum.kirupa.com/u/cbrf23)\
**Post date:** [April 18, 2009, 5:11am UTC](https://forum.kirupa.com/t/swfobject-getting-site-to-fill-window/286642/1 "2009-04-18T05:11:46Z")

</div>

Hello everyone. I’m using swfobject for my first time, and I’m having a little trouble getting the site to work the way I want it to… I want the movie to fill the browser window, and resize itself with the window. I also have a button to enter fullscreen mode, which is working when I click it, so I dont think I need help there…

If I set the size of my movie to a fixed size of 900x500 it appears in the top left corner and it works fine.

But I need the site to fill the browser window, not just be a fixed size.

Here is the code for fixed size:

```auto
<script type="text/javascript" src="swfobject.js"></script>
        <script type="text/javascript">
            var flashvars = {};
            var params = {};
            params.quality = "high";
            params.scale = "noscale";
            params.wmode = "window";
            params.bgcolor = "#000000";
            params.allowfullscreen = "true";
            params.allowscriptaccess = "sameDomain";
            var attributes = {};
            attributes.id = "FlashContent";
            attributes.align = "middle";
            swfobject.embedSWF("index.swf", "AlternativeContent", "900" , "500", "9.0.28", "expressInstall.swf", flashvars, params, attributes);
        </script>

```

I tried to change the object properties to the following, but when I do this, the movie doesnt appear at all - i just get a blank white page.

```auto
 swfobject.embedSWF("index.swf", "AlternativeContent", "100%" , "100%", "9.0.28", "expressInstall.swf", flashvars, params, attributes);
        </script>

```

Anyone have any suggestions? I’m new to html, but I understand what everything is doing for the most part, I’m just having trouble getting this to work the way I want.

Thanks!

-Steve
