dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Center flash embedded with swfobject 2.0

  1. #1
    Member
    Join Date
    Oct 2005
    Location
    England
    Posts
    85

    Center flash embedded with swfobject 2.0

    Hi,
    Im trying to switch over to using swfobject 2 to display my flash. I seem to have everything in place apart from having my site centered. I only want it horizontally centered.
    Here's my current code.
    Any help is very much apreciated.

    <!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>Title</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.embedSWF("index.swf", "myContent", "800", "600", "8.0.0", "expressInstall.swf");
    </script>
    <script language="JavaScript">
    function openNewWindow(URLtoOpen, windowName, windowFeatures) { newWindow=window.open(URLtoOpen, windowName, windowFeatures); }
    </script>
    <style type="text/css">
    <!--
    .style1 {color: #FFFFFF}
    -->
    </style>
    </head>
    <body bgcolor="#000000">
    <div align="center" id="myContent">
    <h1 class="style1">Alternative content</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>
    </body>
    </html>

    Thanks
    Alan

  2. #2
    AS3 Mod
    Join Date
    Sep 2007
    Location
    O-H-I-O
    Posts
    2,385
    <style type="text/css">
    <!--
    body {
    text-align: center;
    margin: 0px auto;
    padding: 0px;
    }
    .style1 {color: #FFFFFF}
    -->
    </style>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center