all groups > macromedia flash sitedesign > august 2006 >
You're in the

macromedia flash sitedesign

group:

Centering Flash Websites???


Centering Flash Websites??? setmybabyfree
8/8/2006 1:12:25 PM
macromedia flash sitedesign:
Hi people,

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:

<title>main</title>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<center>
<object classid="clsid:d28cdb6e-ae6d-12cf-97b7-444772540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
rsion=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" />
</object>
</center>
</body>
</html>


For an example to see what I mean look at http://www.louisvuitton.com

Your help would be greatly appreciated,
Thanks.
Re: Centering Flash Websites??? parkeast
8/8/2006 4:54:42 PM
Well, first off you need to use updated code on your pages so that IE on PC
will show the site without having to have it "enabled".

I would suggest using the
http://www.adobe.com/devnet/flash/articles/fp8_detection.html listed on the
Adobe web site.

After that, head over to http://www.gotoandlearn.com and check out his
tutorial on centering Flash sites. Just as an FYI, the way I implement his
cenetering technique on sites http://www.lakesideatcrosscreek.com is by putting
the entire "site" inside a movieclip, and then having the code center that
movieclip.

Hope that helps!
Re: Centering Flash Websites??? setmybabyfree
8/9/2006 12:00:00 AM
AddThis Social Bookmark Button