-
Hi folks
I'd like to embed my .swf file in an html page so that it centers both horizontally and vertically in the browser.
(eg: no matter what browser size the viewers using, it'll always be centered)
I would appreciate if someone can give me a tip on how to achieve this. TIA
-
Insert your SWF into a table at 100%w/100%h, then set the attributes of your table to center all contents within it - as simple as that !
Dreamweaver and most other editors make life easier, if your coding by hand, go copy another site's HTML
regards,
Richard Shea
-
Thanks guys
I'm pretty dumb and hopeless with html, but I inserted my movie into a table in frontpage and it centers horizontally but not vertically. here's the code: What have I got wrong?
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META NAME="Generator" CONTENT="Microsoft FrontPage 4.0">
<TITLE>Home</TITLE>
<LINK REL=STYLESHEET TYPE="text/css" HREF="./style.css">
<LINK REL=STYLESHEET TYPE="text/css" HREF="./site.css">
<STYLE>
</STYLE>
</HEAD>
<BODY STYLE="text-align: center; background-color: rgb(0,0,0);" TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 NOF=LY>
<TR VALIGN=TOP ALIGN=LEFT>
<TD WIDTH=760>
<TABLE ID="Table1" BORDER=0 BGCOLOR="#000000" CELLSPACING=0 CELLPADDING=0 WIDTH="100%" height="100%">
<TR>
<TD WIDTH=760>
<P>
<div align="center">
<center>
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 NOF=TE height="100%">
<TR>
<TD ALIGN="CENTER" valign="middle" width="100%" height="100%">
<OBJECT CLASSID="clsid27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://active.macromedia.com/flash2/cab5/swflash.cab#version=2,1,0,12" HEIGHT=400 WIDTH=760 ID="Shockwave1">
<PARAM NAME="Movie" VALUE="./24.11.00_Intro.swf">
<PARAM NAME="Quality" VALUE="AutoHigh">
<PARAM NAME="Loop" VALUE="0">
<PARAM NAME="Play" VALUE="1">
<PARAM NAME="Scale" VALUE="ExactFit">
<PARAM NAME="SAlign" VALUE="L">
<EMBED ID="Shockwave1" SRC="./24.11.00_Intro.swf" HEIGHT=400 WIDTH=760 PALETTE=BACKGROUND Quality=AutoHigh Loop=FALSE Play=TRUE Scale=ExactFit SAlign=L
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/"></OBJECT>
</TD>
</TR>
</TABLE>
</center>
</div>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
-
In typical Frontpage fashion, it puts in loads of junk code which never works ... dump the editor, it's hopeless in comparison to Dreamweaver which I just used to creat this :
(replace your code with this)
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META NAME="Generator" CONTENT="Microsoft FrontPage 4.0">
<TITLE>Home</TITLE>
<LINK REL=STYLESHEET TYPE="text/css" HREF="./style.css">
<LINK REL=STYLESHEET TYPE="text/css" HREF="./site.css">
<STYLE>
</STYLE>
</HEAD>
<BODY STYLE="text-align: center; background-color: rgb(0,0,0);" TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table width="100%" border="1" cellspacing="0" cellpadding="0" height="100%">
<tr valign="middle" align="center">
<td>
<div align="center">
<OBJECT CLASSID="clsid27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://active.macromedia.com/flash2/cab5/swflash.cab#version=2,1,0,12" HEIGHT=400 WIDTH=760 ID="Shockwave1">
<PARAM NAME="Movie" VALUE="./24.11.00_Intro.swf">
<PARAM NAME="Quality" VALUE="AutoHigh">
<PARAM NAME="Loop" VALUE="0">
<PARAM NAME="Play" VALUE="1">
<PARAM NAME="Scale" VALUE="ExactFit">
<PARAM NAME="SAlign" VALUE="L">
<EMBED ID="Shockwave1" SRC="./24.11.00_Intro.swf" HEIGHT=400 WIDTH=760 PALETTE=BACKGROUND Quality=AutoHigh Loop=FALSE Play=TRUE Scale=ExactFit SAlign=L
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/"></OBJECT>
</div>
</td>
</tr>
</table>
</BODY>
</HTML>
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|