A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: Centering Flash and Image on top of each other

  1. #1
    Junior Member
    Join Date
    May 2010
    Posts
    17

    Centering Flash and Image on top of each other

    Right now the png file is positioned on top in the center of the page and the flash below it in the center of the page. I want both to be in the same spot, horizontally and vertically centered in the page. How can I do this? Thanks.

    Code:
    <!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>
    
    
    <style type="text/css">
                /* hide from ie on mac \*/
                html {
                    height: 100%;
                    overflow: hidden;
                }
                #flashcontent {
                    width: 100%;
    				height: 100%;
    
                }
                /* end hide */
                body {
                    height: 100%;
                    margin: 0;
    				padding: 0;
                }
    			#frame{
    				position: absolute;
    			    width: 100%;
    				margin:auto;
    				z-index:1
    			}
    			#flash{
    				position: absolute;
    				width: 100%;
    				margin:auto;
    				z-index:99;
    			}
    			
    </style>
    
    <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    <script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-16886040-1']);
    _gaq.push(['_trackPageview']);
    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
    </script>
    
    
    </head>
    
    <body background="content/background.jpg">
    
    
    
    <div id="frame"><img src="content/frame.png" />
    <div id="flash"></div>
    </div>
    <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" height="600">
      <param name="movie" value="ss3.swf" />
      <param name="quality" value="high" />
      <param name="wmode" value="opaque" />
      <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 type="application/x-shockwave-flash" data="ss3.swf" width="800" height="600">
        <!--<![endif]-->
        <param name="quality" value="high" />
        <param name="wmode" value="opaque" />
        <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>
    <script type="text/javascript">
    swfobject.registerObject("FlashID");
    </script>
    </body>
    </html>
    Last edited by coldmail590; 06-11-2010 at 04:12 AM.

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