Centering Flash Websites??
I've designed a website in flash but I don't know how to center it horizontally as well as vertically. I know that if I ad a <center> tag, that centers it horizontally only. Does anyone know how to center it so that when you re-scale your browser, the website remains centered horizontally and vertically?
The code at the moment is this:
<!--url's used in the movie-->
<!--text used in the movie-->
<object classid="clsid:d28cdb6e-ae6d-12cf-97b7-444772540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="910" height="500" id="main" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="main.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="main.swf" quality="high" bgcolor="#ffffff" width="910" height="500" name="main" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
For an example to see what I mean look at http://www.louisvuitton.com
Your help would be greatly appreciated,
use a table!
Yep - table's quickest. It's a bit of a blag and SEO boys'll frown, but hey - it's flash, no search engine can read it anyway!
Change your width and height to percentages (100% on both)
If you mean when you publish the movie out of Flash - don't. It blows all the fonts, pictures, everything and looks horrible.
Originally Posted by wh666-666
If you want to hvae a liquid site in flash it is possible. You use the Stage object and more specfically the Stage.onResize() function. You are then in the business of dynamically attaching movieclips from the library.
There are some good tutoriasl out these, I can't remember the urls at the mo, but the help in Flash isn't too bad for the Stage object.
I meant what i said, create the swf then alter the html to 100% width and height, it doesnt affect the formatting and looks exactly the same on all screens. I create flash website on a 17" and can view it in 14",15",17",19" etc. It doesnt matter at all what resolution/screen size you use
I disagree - if you are setting the swf to 100% then it looks rubbish. If you are setting the table that holds it to 100% that's different.
Setting the swf to 100% DOES NOT WORK if you want to have a good looking site.
We'll have to agree to disagree worthyashes as ive set the swf to 100% on alot of sites and never had a problem before but i was suggesting to alter the table (ie. html) to 100%. Ive done that before as well and works fine
Anyway looking at the site again through firefox 1.5 i dont have a problem with alignment at all, only with the height as i get a small scroll.
Last edited by wh666-666; 08-15-2006 at 06:22 AM.
don't use a table they slow down your browser! put it into this:
<div style="margin: 0 auto;">
Last edited by crazycoder; 08-18-2006 at 05:09 PM.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)