12 Replies Latest reply on Jul 15, 2008 5:57 AM by yolinka

    centering website

    yolinka
      hello all,


      workin on my first ever flash website, and its pretty much finished.
      im having problems with centering my site.
      i know its an issue that has allready alot of posts and i have looked then all up but all
      i managed to do from what i learned from them was to center it horizontally.
      im having problems with centering it vertically.
      i dont know anything about html so im posting it entirely here:

      <html xmlns=" http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-8" />
      <title>Untitled-6</title>
      <script language="javascript">AC_FL_RunContent = 0;</script>
      <script src="AC_RunActiveContent.js" language="javascript"></script>
      </head>
      <body bgcolor="#ffffff">
      <center>
      <!--url's used in the movie-->
      <a href="D:\website\doc\CV-heb.rtf"></a>
      <a href="mailto:joelr@bezeqint.net"></a>
      <!--text used in the movie-->
      <!-- saved from url=(0013)about:internet -->
      <script language="javascript">
      if (AC_FL_RunContent == 0) {
      alert("This page requires AC_RunActiveContent.js.");
      } else {
      AC_FL_RunContent(
      'codebase', ' http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
      'width', '850',
      'height', '600',
      'src', 'Untitled-6',
      'quality', 'high',
      'pluginspage', ' http://www.macromedia.com/go/getflashplayer',
      'align', 'middle',
      'play', 'true',
      'loop', 'true',
      'scale', 'showall',
      'wmode', 'window',
      'devicefont', 'false',
      'id', 'Untitled-6',
      'bgcolor', '#ffffff',
      'name', 'Untitled-6',
      'menu', 'true',
      'allowFullScreen', 'false',
      'allowScriptAccess','sameDomain',
      'movie', 'Untitled-6',
      'salign', ''
      ); //end AC code
      }
      </script>
      <noscript>
      <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="850" height="600" id="Untitled-6" align="middle">
      <param name="allowScriptAccess" value="sameDomain" />
      <param name="allowFullScreen" value="false" />
      <param name="movie" value="Untitled-6.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="Untitled-6.swf" quality="high" bgcolor="#ffffff" width="850" height="600" name="Untitled-6" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage=" http://www.macromedia.com/go/getflashplayer" />
      </object>
      </noscript>
      </body>
      </center>
      </html>


      thanks in advance,

      joel
        • 1. Re: centering website
          kglad Adobe Community Professional & MVP
          use div tags to position your swf.
          • 2. Re: centering website
            yolinka Level 1
            well, the flash book i bought doesent talk about div...
            i dont really know what to do about it...
            • 3. Re: centering website
              kglad Adobe Community Professional & MVP
              search google. div tags (like html tags) are not part of flash.
              • 4. Re: centering website
                Chuckanucka
                <div style="margin:auto 0;width:850px">
                // embed code here
                </div>

                also look up swf object for a better embed method.
                • 5. Re: centering website
                  yolinka Level 1
                  hey chuckanucka,

                  thanks for your reply.
                  i tried what to suggested and it doesent work- now i dont even have horizontal centering.
                  here is the code:

                  <html xmlns=" http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
                  <head>
                  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-8" />
                  <title>Untitled-6</title>
                  <script language="javascript">AC_FL_RunContent = 0;</script>
                  <script src="AC_RunActiveContent.js" language="javascript"></script>
                  </head>
                  <body bgcolor="#ffffff">
                  <div style="margin:auto 0;width:850px">
                  <!--url's used in the movie-->
                  <a href="D:\website\doc\CV-heb.rtf"></a>
                  <a href="mailto:joelr@bezeqint.net"></a>
                  <!--text used in the movie-->
                  <!-- saved from url=(0013)about:internet -->
                  <script language="javascript">
                  if (AC_FL_RunContent == 0) {
                  alert("This page requires AC_RunActiveContent.js.");
                  } else {
                  AC_FL_RunContent(
                  'codebase', ' http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
                  'width', '850',
                  'height', '600',
                  'src', 'Untitled-6',
                  'quality', 'high',
                  'pluginspage', ' http://www.macromedia.com/go/getflashplayer',
                  'align', 'middle',
                  'play', 'true',
                  'loop', 'true',
                  'scale', 'showall',
                  'wmode', 'window',
                  'devicefont', 'false',
                  'id', 'Untitled-6',
                  'bgcolor', '#ffffff',
                  'name', 'Untitled-6',
                  'menu', 'true',
                  'allowFullScreen', 'false',
                  'allowScriptAccess','sameDomain',
                  'movie', 'Untitled-6',
                  'salign', ''
                  ); //end AC code
                  }
                  </script>
                  <noscript>
                  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="850" height="600" id="Untitled-6" align="middle">
                  <param name="allowScriptAccess" value="sameDomain" />
                  <param name="allowFullScreen" value="false" />
                  <param name="movie" value="Untitled-6.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="Untitled-6.swf" quality="high" bgcolor="#ffffff" width="850" height="600" name="Untitled-6" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage=" http://www.macromedia.com/go/getflashplayer" />
                  </object>

                  </div>
                  </noscript>
                  </body>
                  </html>



                  am i donig something wrong?
                  i dont know nothing on html or dic tags. this is my first flash project and i am learnning alone...
                  thanks , joel
                  • 6. Re: centering website
                    kglad Adobe Community Professional & MVP
                    chuck's code isn't close. and your implementation wouldn't work even if it were correct.

                    this should get you started:

                    • 7. Re: centering website
                      yolinka Level 1
                      thanks kglad,


                      where do i put the head tags?
                      i impanted the lower part that you gave me inside the html,
                      but i guess that the first part should go somewhere else...

                      is this intended for flash or dreamweaver?

                      thanks, joel
                      • 8. Re: centering website
                        kglad Adobe Community Professional & MVP
                        this code that you're going to add to the html file created by flash when you publish your fla to a swf and embedding html file.

                        you already have <head> and </head> tags in your html file. leave them alone. place the first snippet within those tags.

                        • 9. Re: centering website
                          yolinka Level 1
                          hello kglad,

                          sorry to be a nag, but i put the lines you gave me and still im getting only vertical alignment.
                          here is what i did:

                          <html xmlns=" http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
                          <head>
                          <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-8" />
                          <title>Untitled-7</title>
                          <script language="javascript">AC_FL_RunContent = 0;</script>
                          <script src="AC_RunActiveContent.js" language="javascript"></script>
                          <style type=text/css>
                          html, body {
                          height: 100%;
                          }
                          body {
                          text-align: center;
                          padding: 0;
                          margin: 0;
                          }
                          div#distance {
                          margin-bottom: -10em;
                          background: red;
                          width: 1px;
                          height: 50%;
                          float: left;

                          }
                          div#flash {
                          position: relative;
                          text-align: left;
                          height: 20em;
                          width: 40em;
                          background: blue;
                          margin: 0 auto;
                          clear: left;
                          }
                          </style>
                          </head>
                          <body bgcolor="#ffffff">
                          <!--url's used in the movie-->
                          <!--text used in the movie-->
                          <!-- saved from url=(0013)about:internet -->
                          <script language="javascript">
                          if (AC_FL_RunContent == 0) {
                          alert("This page requires AC_RunActiveContent.js.");
                          } else {
                          AC_FL_RunContent(
                          'codebase', ' http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
                          'width', '850',
                          'height', '600',
                          'src', 'Untitled-7',
                          'quality', 'high',
                          'pluginspage', ' http://www.macromedia.com/go/getflashplayer',
                          'align', 'middle',
                          'play', 'true',
                          'loop', 'true',
                          'scale', 'showall',
                          'wmode', 'window',
                          'devicefont', 'false',
                          'id', 'Untitled-7',
                          'bgcolor', '#ffffff',
                          'name', 'Untitled-7',
                          'menu', 'true',
                          'allowFullScreen', 'false',
                          'allowScriptAccess','sameDomain',
                          'movie', 'Untitled-7',
                          'salign', ''
                          ); //end AC code
                          }
                          </script>
                          <noscript>
                          <div id="distance"></div>
                          <div id="flash">
                          <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="850" height="600" id="Untitled-7" align="middle">
                          <param name="allowScriptAccess" value="sameDomain" />
                          <param name="allowFullScreen" value="false" />
                          <param name="movie" value="Untitled-7.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="Untitled-7.swf" quality="high" bgcolor="#ffffff" width="850" height="600" name="Untitled-7" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage=" http://www.macromedia.com/go/getflashplayer" />
                          </object>
                          </div>
                          </noscript>
                          </body>
                          </html>


                          what am i doing wrong????

                          thanks, joel
                          • 10. Re: centering website
                            kglad Adobe Community Professional & MVP
                            what do you mean you're "still" getting vertical alignment? you didn't have vertical alignment before.
                            • 11. Re: centering website
                              yolinka Level 1
                              sorry, got mixed up.
                              getting only horizontal alignment, not vertical.
                              what am i doing wrong?
                              • 12. Re: centering website
                                yolinka Level 1
                                no one can help me?
                                im about ten seconds from finishing my website and this is the last thing i got to finish...


                                thanks, joel