Comunidad de diseño web y desarrollo en internet online

Centrar Flash

Citar            
MensajeEscrito el 12 Feb 2009 10:32 am
Hola,
Quiero centrar my flash, utilizando swfobject. He estado leyendo la documentación de swfobject, y algo más para centrar mi película. El caso es que consigo centrarla horizontálmente, pero no verticálmente. Me podría alguien ayudar con el código???.
Un saludo


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Movie</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("movie", "9.0.0", "expressInstall.swf");
</script>
</head>
<body bgcolor="#2c0201" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<table width="100%" border="0" height="100%" cellspacing="0">
<tr>
<td valign="middle">

<div align="center">
<object id="tobelos" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="1024" height="634">
<param name="movie" value="movie.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="movie.swf" width="1024" height="634">
<!--<![endif]-->
<div>
<h1>Download version</h1>
<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" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
</td>
</tr>
</table>
</body>
</html>

Por bribon

13 de clabLevel



 

firefox
Citar            
MensajeEscrito el 12 Feb 2009 10:44 am
También lo he intentado con este código y no consigo centarlo horizontalmente:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Movie</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css" media="screen">
body { margin:0; text-align:center; background-color:#2c0201; }
div#content { text-align:left; }
object#content { display:inline; }
</style>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF("loader.swf", "content", "1024", "634", "9.0.0", "expressInstall.swf");
</script>
</head>
<body>
<div id="content">Alternative content</div>
</body>
</html>

Por bribon

13 de clabLevel



 

firefox
Citar            
MensajeEscrito el 12 Feb 2009 03:51 pm
mira a ver si te sirve este tip

Por Eliseo2

710 de clabLevel



 

firefox
Citar            
MensajeEscrito el 12 Feb 2009 04:28 pm
Revisa este codigo, este esta centrando y quitando los margenes:

<!-- saved from url=(0013)about:internet -->
<html lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>indice_main</title>
<script language="javascript"> AC_FL_RunContent = 0; </script>
<script language="javascript"> DetectFlashVer = 0; </script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
// -----------------------------------------------------------------------------
// Globales
// Se requiere una versión superior de Flash
var requiredMajorVersion = 9;
// Se requiere una versión inferior de Flash
var requiredMinorVersion = 0;
// Se requiere revisión de Flash
var requiredRevision = 115;
// -----------------------------------------------------------------------------
// -->
</script>
</head>
<body bgcolor="#eaeaea" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<!--URL utilizadas en la película-->
<!--Texto utilizado en la película-->
<script language="JavaScript" type="text/javascript">
<!--
if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
alert("Esta página requiere el archivo AC_RunActiveContent.js.");
} else {
var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if(hasRightVersion) { // si se ha detectado una versión aceptable
// incorporar la película flash
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0',
'width', '100%',
'height', '100%',
'src', 'indice_main',
'quality', 'best',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'false',
'scale', 'noscale',
'wmode', 'window',
'devicefont', 'false',
'id', 'indice_main',
'bgcolor', '#eaeaea',
'name', 'indice_main',
'menu', 'false',
'allowScriptAccess','sameDomain',
'allowFullScreen','false',
'movie', 'indice_main',
'salign', ''
); //end AC code
} else { // la versión de flash es demasiado antigua o no se puede detectar el plug-in
var alternateContent = 'El contenido HTML alternativo debe colocarse aquí. '
+ 'Este contenido requiere Adobe Flash Player. '
+ '<a href=https://www.macromedia.com/go/getflash/>Obtener Flash</a>';
document.write(alternateContent); // Insertar contenido que no sea de Flash
}
}
// -->
</script>
<noscript>
// Proporcionar contenido alternativo para los navegadores que no admitan la creación de scripts
// o que tengan esta función desactivada.
El contenido HTML alternativo debe colocarse aquí. Este contenido requiere Adobe Flash Player.
<a href="https://www.macromedia.com/go/getflash/">Obtener Flash</a>
</noscript>
</body>
</html>

Por lororojo

52 de clabLevel



 

msie7
Citar            
MensajeEscrito el 12 Feb 2009 04:33 pm
Cambia el nombre de tu_archivo.swf por indice_main.swf y prueba con el html, te lo debe centrar y quitarte los margenes

Por lororojo

52 de clabLevel



 

msie7
Citar            
MensajeEscrito el 23 Jul 2009 02:30 pm

lororojo escribió:

Cambia el nombre de tu_archivo.swf por indice_main.swf y prueba con el html, te lo debe centrar y quitarte los margenes
Y donde esta "indice_main.swf" ?

Por Kaiowas

3 de clabLevel



 

chrome

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.