Groups | Blog | Home
all groups > flash (macromedia) > june 2004 >

flash (macromedia) : Center Flash in HTML not working


seb
6/20/2004 5:53:35 PM
Dreamweaver inserts a new doctype (in accordance with latest W3C html
regulations). These latest regulations, for reasons that still baffle me
as ridiculous and retarded, declare that the 100% height attribute for a
table is INVALID html.
As a result, browsers who otherwise know very well what a 100% high
table is, have to screw up when they see such attribute, in order to
obey to the doctype.
So you can either remove the doctype (and your page will be centered as
expected, but will not validate in regards to latest W3C standards), or
look for another solution to center your movie in the browser window,
using CSS.
Best CSS solution I know of, which works in all browsers EXCEPT IE5 FOR
MAC (which happens to be the default browser for 50% Mac usres), is:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
#content{
position: absolute;
top: 50%;
left: 50%;
margin-left: -200px;
margin-top: -100px;
width: 400px;
height: 200px;
background-color: #006;
color: #fff;
}
</style>
</head>
<body>
<div id="content">Put your flash content here</div>
</body>
</html>

[quoted text, click to view]
cmb5400
6/20/2004 9:15:18 PM
I created a Flash Form Application in Flash MX 2004 Professional and I want to
center this in the HTML page using Dreamweaver 7. I have successfully centered
flash movies inserting the following code in HTML pages in the past using Flash
5 and Dreamweaver 4 but it doesn't work with the new project in Flash 7 and
Dreamweaver 7. Here is what I am using around the object tags:

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

The swf file will center right to left but not top to bottom, it appears at
the top of the browser window. This works with files I created in Flash 5 but
not with Files from Flash MX 2004 Professional.

Thanks in advance for any help.

cmb

cmb5400
6/20/2004 11:44:04 PM
AddThis Social Bookmark Button