Raptorze,
[quoted text, click to view] > I'd like simply to make the swf file load in a website - the
> same size - no matter the resolution, and stay put (even if
> you scroll up and if you shrink the browser window) and
> if i look at it on John or Suzie's laptop - at least maintains
> it size and position :)
Okay. :)
[quoted text, click to view] > I have a swf file loading the div layer of a page... at
> 1280x1024 its wonderful... at anything less - it's huge and
> not where I had it...
I guess you're embedding it with pixel-based width and height, instead
of percentage-based.
[quoted text, click to view] > Here is the DIV LAYER code:
> <div id="Layer1" style="position:absolute;
> width:200px; height:115px; z-index:1; left: 664px; top:
> 336px;">
So here's a <div> whose position is absolute, set to 664 pixels in from
the left and 336 pixels down from the top. This <div> will therefore always
be 664 in and 336 down. Please understand, this might happen to look
centered if your browser is maximized and your resolution is set to
1024x768, but if you change either of these, the <div> may no longer appear
centered, even though it's still 664 in and 336 down. By the way, that's
664 in and 336 down from the browser's upper lefthand corner.
[quoted text, click to view] > <object
> [snipped code]
> version=6,0,0,0" width="400" height="320"
> id="billboard_barnesX" align="middle">
Here, you're explicitly setting your SWF's width and height to 400 by
320. There is no "breathing" going on: the SWF will always be 400x320,
because that's how you've set its width and height.
[quoted text, click to view] > <embed src="billboard_barnesX.swf"
> quality="best" wmode="transparent" bgcolor="#ffffff"
> width="400" height="320"
Same here. The <object> tag is for IE; the <embed> tag is for all the
other browsers.
[quoted text, click to view] > I just want the thing to stay put and stay the same
> size... Ugh!
Is it changing? Honestly?
[quoted text, click to view] > On an 800x600 resolution ---> it's enormous - like a
> GIANT NIGHTMARE!! and off the screen completely...
Well, that would make sense. You set your <div> to appear at 664 pixels
in from the left. At a resolution of 800x600, your screen is only 800
pixels wide. That leaves your SWF only 136 pixels to squeeze itself in
place -- and yet your SWF is set to 400 pixels wide. No wonder it doesn't
fit!
If you pay careful attention, you'll notice that the SWF stays exactly
the same size as before, even if it appears bigger: it stays the same *in
proportion* to other items on the page. When you change your resolution
from high(er) to low(er), you'll notice that *everything* appears bigger.
Everything. The reason for this is because your monitor is only showing 800
pixels across, rather than 1024 (or even more).
[quoted text, click to view] > There should be a standard setting on publish settings for
> any movie...
>
> Keep a certain size and maintain position no matter!
Well, you're already doing it. I think what you're really saying is
that you want your SWF to actually *change* size and position. You want it
to shrink in cases where the resolution is lower and/or grow when resolution
is higher, to compensate.
There are a number of ways to handle this. You might, for example, use
percentages instead of pixel values for the width and height attributes of
your <object> and <embed> tags. 100% width and 100% height is what it says,
after all. Of course, going this route means you'll have to consider that
some people will maximize their browsers and some wont. For people who keep
their browsers un-maximized, the SWF will still be 100% the width and height
of the browser, even if they purposefully size the browser down to one
quarter of their full screen size.
It can get as complicated as you want. You could employ JavaScript to
measure the user's screen size in pixels, then use JavaScript again to set
the width and heigth attributes of your <object>/<embed> tags accordingly.
You could forego JavaScript and do it all "in house," as it were, using
ActionScript to measure the width of the Stage itself and resize the SWF in
question accordingly. To do it this way, you would have to make use of the
Stage.onResize event handler and follow the guidelines ni the article here
....
http://www.moock.org/blog/archives/000021.html Be aware that, depending on your HTML document's doctype, Mozilla
browsers may not display a percentage-based width and height as expected.
To remedy this, either drop the doctype (at your own risk -- search
alistapart.com to see the benefits of doctypes) or add the following CSS to
your document:
<style>
html, body { width: 100%; }
</style>
David
stiller (at) quip (dot) net
"Luck is the residue of good design."