PDA

View Full Version : [HTML] centrare verticalmente e orizzontalmente un'animazione SWF


JSR
24-12-2010, 01:15
ciao a tutti

So che la richiesta potrà essere banale per i più esperti.
Per questo ho preferito fare prima varie ricerche e provare i tutorial/consigli trovati su google ma nessuno di questi mi ha funzionato.

In pratica dovrei centrare sia verticalmente che orizzontalmente un'animazione SWF in un file html. Vorrei fare in modo che quella animazione rimanga sempre al centro della finestra del browser, anche dopo un'eventuale rimpicciolimento/ingrandimento della stessa.
Fin'ora il problema non è l'allineamento orizzontale ma quello verticale.
Ovvero nonostante tutte le modifiche riesco a mettere l'animazione al centro (centrata orizzontalmente) della pagina ma mi rimane comunque in alto.

il filw SWF è stato progettato con Flash CS5 in actionscript 3 mentre l'html è stato creato con Dreamweaver CS5

questo è il codice:


<!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>Untitled Document</title>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
<style type="text/css">
body {
background: url(leather.jpg) fixed center no-repeat;
}
</style>
</head>
<body>
<div id="outer" {height: 100%; overflow: visible;}>
<div id="middle">
<div id="inner">
<div align="center">
<p>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="200" height="200" align="middle" id="FlashID">
<param name="movie" value="splash-pelle.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="swfversion" value="6.0.65.0" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object data="splash-pelle.swf" type="application/x-shockwave-flash" width="200" height="200" align="middle">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="swfversion" value="6.0.65.0" />
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</center>
</p>
</div>
</div>
</div>
</div>
<script type="text/javascript">
swfobject.registerObject("FlashID");
</script>

</td>
</tr>
</table>

</body>
</html>


sapreste darmi qualche dritta?
Grazie mille!

P.S.
Tanti Auguri!! :)