PDA

View Full Version : swf doesn't stay in centre of page


hanzi
01-13-2008, 12:17 PM
Hi

I'm working on a widescreen monitor and I placed my swf movie in the middle of my page but if I view the page on a normal monitor the swf movie is a little to the left or right and not in the centre of the page. I want the page to auto stretch to the size of the monitor its diplayd on but the content must stay in the correct places

I'm new to any form of html so any help would be greatly appreciated.

Thanx

hanzi
01-13-2008, 12:32 PM
Nevermind. After browsing the forum a bit I found the answer I was looking for. Thanx anyway

hanzi
01-14-2008, 03:12 PM
Nope that didn't work, don't know if I did it wrong or what but if you can still give me some pointers that would be great.

Cary
01-14-2008, 10:16 PM
Do you have a url we can look at to see what's going on?

hanzi
01-15-2008, 03:10 PM
no i dont but this is the html code that i can see in dreamweaver...

<!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=utf-8" />
<title>Occasions Index</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
background-color: #0F0F0F;
background-image: url(backgorund2.png);
background-repeat: repeat-x;
}
#apDiv1 {
position:absolute;
left:361px;
top:100px;
width:580px;
height:650px;
z-index:1;
overflow: visible;
}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<body>
<div align="center" id="apDiv1">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','580','heigh t','650','src','gallery','quality','high','plugins page','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','gallery' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="580" height="650">
<param name="movie" value="gallery.swf" />
<param name="quality" value="high" />
<embed src="gallery.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="580" height="650"></embed>
</object>
</noscript></div>
</body>
</html>

this works fine on a normal monitor but as soon as I drag it to my widescreen, the flash movie is little to the left and not centre.

Hope this helps

fwr1000
01-15-2008, 07:19 PM
I noticed you have an absolutely placed div (#apDiv1) that contains the flash movie with the left position at 361 px. Could this be why it won't center?

#apDiv1 {
position:absolute;
left:361px;
top:100px;
width:580px;
height:650px;
z-index:1;
overflow: visible;

domedia
01-15-2008, 07:30 PM
Look at the tutorial we have on centered content, it will tell you how. Don't use #apDIV.. this is an absolutely positioned DIV, which directly clashes with your goal about centering.