# Stretching SWF's all the way across browser

**URL:** <https://forum.kirupa.com/t/stretching-swfs-all-the-way-across-browser/60200>\
**Category:** flash\
**Created:** [August 7, 2004, 6:15pm UTC](https://forum.kirupa.com/t/stretching-swfs-all-the-way-across-browser/60200 "2004-08-07T18:15:47Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![March4Revenge](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@March4Revenge](https://forum.kirupa.com/u/March4Revenge)\
**Post date:** [August 7, 2004, 6:15pm UTC](https://forum.kirupa.com/t/stretching-swfs-all-the-way-across-browser/60200/1 "2004-08-07T18:15:47Z")

</div>

I want to have a movie, a trailer basically, stretch all the way across so it is touching the browser from the left to the right borders.

Just like a widescreen movie trailer.

EXACTLY like this actually:  
[http://www.dreams2.com/siteintro1.htm](http://www.dreams2.com/siteintro1.htm)

How would I achieve this? Do i still need to put it in an html page? What?

Thanks in advance,  
M4R

---

<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:** [August 7, 2004, 6:18pm UTC](https://forum.kirupa.com/t/stretching-swfs-all-the-way-across-browser/60200/2 "2004-08-07T18:18:33Z")

</div>

set height and width to 100%… but actually a bug in ff causes this not to work very well, I suggest either redirecting to the swf itself or including a div that stretches to 100% and somehow get the swf inside it to do so as well… if you want I can go get the sourcecode for how I do it

---

<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:** [August 7, 2004, 6:26pm UTC](https://forum.kirupa.com/t/stretching-swfs-all-the-way-across-browser/60200/3 "2004-08-07T18:26:18Z")

</div>

That’s be really cool if you snagged the source code man. Also, could you just explain where in flash I make these adjustments? 🙂

I gotta run out for an hour but I’ll be back to check. Thank you a bunch for the reply.

M4R

---

<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:** [August 8, 2004, 3:54am UTC](https://forum.kirupa.com/t/stretching-swfs-all-the-way-across-browser/60200/4 "2004-08-08T03:54:27Z")

</div>

\<style type=“text/css”\>  
\<!–  
body {  
margin: 0px;  
}  
–\>  
\</style\>

in the head fixes mozilla’s bug 😉

---

<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:** [August 8, 2004, 5:49am UTC](https://forum.kirupa.com/t/stretching-swfs-all-the-way-across-browser/60200/5 "2004-08-08T05:49:56Z")

</div>

ah ha! Hey man thanks a lot! Much appreciated!

---

<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:** [August 8, 2004, 4:25pm UTC](https://forum.kirupa.com/t/stretching-swfs-all-the-way-across-browser/60200/6 "2004-08-08T16:25:01Z")

</div>

np 😉

---

<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:** [August 8, 2004, 7:39pm UTC](https://forum.kirupa.com/t/stretching-swfs-all-the-way-across-browser/60200/7 "2004-08-08T19:39:49Z")

</div>

Crap, I’m an idiot for not realizing that one sooner! Of course just set the CSS magrin to 0pixels for the body. Duh! Delayed reaction on this one, sorry lol!!

---

<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:** [August 9, 2004, 5:06am UTC](https://forum.kirupa.com/t/stretching-swfs-all-the-way-across-browser/60200/8 "2004-08-09T05:06:23Z")

</div>

yeah… stupid mozilla bugs… so odd that firefox has a bug that ie doesn’t have 😛

---

<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:** [August 9, 2004, 6:37am UTC](https://forum.kirupa.com/t/stretching-swfs-all-the-way-across-browser/60200/9 "2004-08-09T06:37:14Z")

</div>

where would you put the scrolling=“no” tag? i tried putting it in the \<div\> tag but it didnt work.

also, how do you get it so the .swf is set so it extends behind the favorites bar and the address bar areas. that’s what i’m looking really looking for.

---

<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:** [August 9, 2004, 12:26pm UTC](https://forum.kirupa.com/t/stretching-swfs-all-the-way-across-browser/60200/10 "2004-08-09T12:26:56Z")

</div>

It’s not a bug in FireFox, it’s the CSS-specified box model recommended by the W3C…😉

Just name the document and load a window into itself via JavaScript and then set the scrollbars=‘no’ for the new JavaScript-opened window.

---

<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:** [August 9, 2004, 3:44pm UTC](https://forum.kirupa.com/t/stretching-swfs-all-the-way-across-browser/60200/11 "2004-08-09T15:44:34Z")

</div>

the fact that it’s not 100%, it’s always only about 200px tall and cutoff is what I was referring too… nothing about the box model 😉

---

<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:** [August 10, 2004, 7:49pm UTC](https://forum.kirupa.com/t/stretching-swfs-all-the-way-across-browser/60200/12 "2004-08-10T19:49:32Z")

</div>

Ok, the correct css code for stretch a swf across the browser is this:

\<style type=“text/css”\>  
\<!–  
body {  
margin: **220px 0px** ;  
}  
–\>  
\</style\>

As you can see it’s just a modified version of what **Bombingpixels** had given me.  
The **220 px** centers the 800x150 swf in the html page. The **0px** allows for no space/border btween the edges of the swf itself and the browser window.

Now in the swf itself, you should make these changes:

\<embed src=“D:\Websites\Cameron\camtrailer.swf” quality=“high” scale=“noborder” bgcolor="#a59f9f" **width=“100%” height=“100%”**

Changing the width and height to 100% does not make the swf take up the whole html page, but intstead keeps it looking like it’s 150px high (it gets flattened like a pancake by the css code).

I don’t know if this is more confusing or what but it worked for me:  
[http://dynamic-effex.com/client/camtrailer.html](http://dynamic-effex.com/client/camtrailer.html)

See? Goes all the way across. The only thing is, any bitmap images you put in this are gonna get pixelated to all hell.
