Link to home
Create AccountLog in
Avatar of flashjordan
flashjordan

asked on

Table over virticly centered SWF movie

I am going crazy, I have a website I am building, where I have a flash movie as the background, with the rest of the content in tables over it. The problem I have is that it is positioned with tdivs and absolute position, which places it ot the left of the browser... I need it centered virticaly. Can anyone help me with this please. Alternatively is there a way to set the SWF a a table background???

Thanks in advance
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

>> Alternatively is there a way to set the SWF a a table background???

No.

>> I need it centered virticaly

Post the page code, please.
Avatar of flashjordan
flashjordan

ASKER

Hi,
Attached is the code of the page, problem is I can't get the flash bg to aligh to the center of the browser ass you will see... any help would be fantastic
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
 
<title>SMTV Events :: Thailand</title>
<script src="../SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<link href="Eventstyles.css" rel="stylesheet" type="text/css">
<link href="../SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css">
<style type="text/css">
       #div1 {
        position: absolute;
		center: 0px; 
		top: 0px;
z-index:1;
width: 800;
height: 800;
        }
      #div2 {
position: relative;
z-index:3;
        }
    </style>
</head>
 
<body>
<div id="div1">
 <script language="javascript">
	if (AC_FL_RunContent == 0) {
		alert("This page requires AC_RunActiveContent.js.");
	} else {
		AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0','width','800','height','800','id','eventmainBG','align','middle','src','flash/eventmainBG','quality','high','wmode','transparent','bgcolor','#ffffff','name','eventmainBG','allowscriptaccess','sameDomain','allowfullscreen','false','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','flash/eventmainBG' ); //end AC code
	}
</script>
<noscript>
	<center><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="800" height="800" id="eventmainBG" align="middle">
	<param name="allowScriptAccess" value="sameDomain" />
	<param name="allowFullScreen" value="false" />
	<param name="movie" value="flash/eventmainBG.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" />	<embed src="flash/eventmainBG.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="800" height="800" name="eventmainBG" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
	</object></center>
</noscript>
</div>
 
<div id="div2">
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="800" height="500" align="center" valign="top"><table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="800" height="130" align="right" valign="bottom" background="../images/events/smtveventstop2.gif"><table width="345" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="45" align="left" class="mainTXT12">Email </td>
              <td width="85" align="left"><input name="textfield2" type="password" id="textfield2" size="10" /></td>
              <td width="60" align="left" class="mainTXT12">Password </td>
              <td width="95" align="left"><label>
                <input name="textfield" type="password" id="textfield" size="10" />
              </label></td>
              <td width="10" align="left">&nbsp;</td>
              <td width="40" align="left"><img src="../images/events/login.gif" alt="" width="40" height="25" /></td>
              <td width="10">&nbsp;</td>
            </tr>
            <tr>
              <td colspan="7" class="mainTXT12"><img src="../images/events/spacer.gif" width="6" height="6" /></td>
            </tr>
        </table></td>
      </tr>
    </table>
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="346" height="519" background="../images/events/smtveventside2.png">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
      <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="22" bgcolor="#FF0000">&nbsp;</td>
          <td height="22" bgcolor="#FF6633">&nbsp;</td>
          <td height="22" bgcolor="#FFFF00">&nbsp;</td>
          <td height="22" bgcolor="#00FF00">&nbsp;</td>
          <td height="22" bgcolor="#0099FF">&nbsp;</td>
          <td height="22" bgcolor="#FF00FF">&nbsp;</td>
        </tr>
        <tr>
          <td height="22" colspan="6">&nbsp;</td>
        </tr>
      </table>
      <br />
      <span class="Copyright9">All Right Reserved By &#3624;&#3641;&#3609;&#3618;&#3660;&#3629;&#3636;&#3609;&#3648;&#3607;&#3629;&#3619;&#3660;&#3648;&#3609;&#3655;&#3605;&#3626;&#3619;&#3657;&#3634;&#3591;&#3626;&#3619;&#3619;&#3588;&#3660;&#3649;&#3621;&#3632;&#3611;&#3621;&#3629;&#3604;&#3616;&#3633;&#3618;&#3648;&#3614;&#3639;&#3656;&#3629;&#3648;&#3618;&#3634;&#3623;&#3594;&#3609; &#3585;&#3619;&#3632;&#3607;&#3619;&#3623;&#3591;&#3624;&#3638;&#3585;&#3625;&#3634;&#3608;&#3636;&#3585;&#3634;&#3619; <br />
27 Lardprao 89 Lardprao Road Wangthonglang Bangkok Thailand 10310 :: Tel. (662) 542 1139 Fax. (662) 542 1805</span><br />
<br />
<img src="../images/events/hazard1.gif" width="800" height="93" /></td>
  </tr>
</table>
</div>
</body>
</html>

Open in new window

Hi,

I solved it with

<style type="text/css">
       #div1 {
      position: absolute;
    top: 0px;
    left: 50%;
      right:50%;
      z-index:1;
      margin-left: -400px;
      width:800;
        }
      #div2 {
position: relative;
z-index:3;
}
</style>

Thanks for your time
ASKER CERTIFIED SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer