PDA

View Full Version : Optimization Problem


Milan
02-13-2002, 11:48 AM
Please help,

I'm making my site optimized for 800x600 resolution, but when I see my site in a different resolution (1600x1200) he covers only a small part of the screen.

Question No. 1

What code should I write in Flash (or HTML) in order for my site to appear in the center of the page?

Question No. 2

Again, what code should I write in order for my background color to fill the rest of the screen?

eg. My site's color is red, but it covers only 1/3 of the screen, and the rest is white, so my site looks very bad in some higher resolution. sample at: www25.brinkster.com/fotofast

Thanks!

Ricod
02-13-2002, 12:01 PM
First, u could also scale your swf to take the full screen (publish at 100% instead of absolute pixels)

To center, u could put the swf in a table, centerd in the middle.
Also isn't there a publish setting that publishes it in the middle ?

The background thing :
<body bgcolor="#FF0000">

Billy T
02-13-2002, 01:37 PM
there's a "center flash in browser" extension you can download from macromedia

JRBT
02-13-2002, 01:40 PM
sounds like it's time to learn HTML!

It's SO easy, literally in two days time you'll never need to ask these questions again. Just order the "Learn HTML in 24 Hours" book or something similar. HTML really isn't a language like actionscript - it really doesn't get any easier!

I promise you will be laughing at yourself once you are done skimming the book!

Have fun!

Ricod
02-13-2002, 01:50 PM
Or just do a little tutorial like on http://www.webmonkey.com . They also have a cheat sheet with all the tags and url-encoding, websafe colors etc. So u don't even have to memorize them :)

(although, after a few times u remember them anyway)

poab
02-13-2002, 02:44 PM
Hi,

My personal preference would be Ricod's suggestion of altering the publish settings to 100% rather than absolute sizes.

The actual code for putting the movie into the center of the screen is:

<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
<tr>
<td width="100%" height="100%" align="center" valign="middle">FLASH CODE HERE</td>
</tr>
</table>

You can also specify an image to tile in the background, or a colour to cover it, in the body tag.

To emphasise JRBT's point, the flash plugin is pretty much a parisite. It exists in the browser. But the browser is the environment, and you should have at least an understanding of how that browser operates. You don't need a book. Webmonkey will tell you everything you want to know.

cheers.

JRBT
02-13-2002, 04:13 PM
I only like to get the books because I'm extra lazy - plus I run an extremely busy business and the only time I have to learn is while on the throne!!! LOL!

Ricod
02-13-2002, 04:58 PM
heheh ! It's a good thing if ur in such a position :) And as a bonus, people will take u more serious, since good running businesses run well for a reason :) !

Milan
02-18-2002, 11:00 AM
Wow!
Didn't expect so much interest in my problem.
Thank you all for helping.

Sckz
02-21-2002, 09:06 PM
Hello!

If you would like to make it professional, you could make your site scalable. But this affects bitmap-pictures when they get bigger than they were originally. I think it is better to make 2 or 3 sites for different screen resolutions. Just build the biggest one and publish the smaller ones in the size needed.

How do I know where to send my customer? Here's the trick.
With JavaScript you can 'read' the screen resolution of your customer and give an url for every resolution. The customer doesn't see it happen.

I was also looking to find this and I found this JavaScript on another (Dutch) Flash forum, so don't credit me, I didn't write it. I also didn't test it yet.

I hope it helps you! Grtz, Sckz

Here it comes:

Place this in the head of your first HTML-page

<!-- 50+ javascripts met demo en instructies vindt je op Dynamic Deezign: http://www.dynamicdeezign.com -->
<SCRIPT LANGUAGE="JavaScript">
//by Micke (mike.lindahl@telia.com)
<!--
function redirectPage() {
var url640x480 = "URL"; //place URL here
var url800x600 = "URL"; //place URL here
var url1024x768 = "URL"; //place URL here
if ((screen.width == 640) && (screen.height == 480))
window.location.href= url640x480;
else if ((screen.width == 800) && (screen.height == 600))
window.location.href= url800x600;
else if ((screen.width == 1024) && (screen.height == 768))
window.location.href= url1024x768;
else window.location.href= url800x600;
}
// -->
</SCRIPT>