How to get my flash anim play in the center of screen @ any res?

Associate
Joined
30 Dec 2003
Posts
1,641
Im currently trying to build my website (in new to it, using dreamweaver) i just want to upload my index page with a single flash anim of my logo...how do i get it to be in the center of the page...iv tired align..middle..abolute middle ext and this dosent effect it..

this is the code...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #6C6C6C;
}
-->
</style></head>

<body>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="400">
<param name="movie" value="anim1.swf">
<param name="quality" value="high">
<param name="LOOP" value="false">
<param name="SCALE" value="exactfit">
<param name="BGCOLOR" value="#6C6C6C">
<embed src="anim1.swf" width="550" height="400" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" scale="exactfit" bgcolor="#6C6C6C"></embed>
</object>
</body>
</html>

yes i know dreamweaver puts some crap in there but i would like to have my flash logo in the center of screen weather vewing on a 800x600 res or like mine 1900x1200

Any help would be awsome. Thanks.
Adam.
 
PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #6C6C6C;
}
-->
</style></head>

<body>
<div align="center">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="400">
    <param name="movie" value="anim1.swf">
    <param name="quality" value="high">
    <param name="LOOP" value="false">
    <param name="SCALE" value="exactfit">
    <param name="BGCOLOR" value="#6C6C6C">
    <embed src="anim1.swf" width="550" height="400" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" scale="exactfit" bgcolor="#6C6C6C"></embed>
  </object>
</div>
</body>
</html>

There you go :D
 
It's not the neatest but it works.

Btw, you need the container in there to keep the centered content from dissapearing through the top of the browser on small resolutions.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
html, body {
background-color: #6C6C6C;
height: 100%;
padding: 0;
margin: 0;
}

#verticalCenter {
visibility: hidden;
width: 100%;
height: 50%;                                                                     
margin-top: -200px;                                                              
}

#horizontalCenter {
width: 550px; 
height: 100%;
margin-left: auto; 
margin-right: auto;
}

#container {
width: 550px;
height: 400px;
}

-->
</style></head>

<body>
<div id="horizontalCenter">
<div id="verticalCenter"></div>
<div id="container">
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="400">
<param name="movie" value="anim1.swf">
<param name="quality" value="high">
<param name="LOOP" value="false">
<param name="SCALE" value="exactfit">
<param name="BGCOLOR" value="#6C6C6C">
<embed src="anim1.swf" width="550" height="400" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" scale="exactfit" bgcolor="#6C6C6C"></embed>
</object>
</div></div>
</body>
</html>
 
Back
Top Bottom