A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Centering script

  1. #1
    Senior Member
    Join Date
    Nov 2000
    Location
    Queenstown, New Zealand
    Posts
    480

    Centering script

    Can somebody give me a sample of html script that will have a black background and center my 800x500 swish made swf movie both vertically and horizontally within the viewers screen.

    with thanks

    Brian

  2. #2
    Carpe Diem - Moderator wolfgross's Avatar
    Join Date
    Apr 2001
    Location
    SWiSHzone
    Posts
    1,700
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html40/loose.dtd">
    <html>
    <head>
    <title>Your Movie</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    <!--
    .centerposition {
    position:absolute;
    top:50%;
    left:50%;
    width:800px;
    height:500px;
    margin-top:-250px; /* half the height */
    margin-left:-400px; /* half the width */
    }
    -->
    </style>

    </head>
    <body bgcolor="#000000" leftmargin="0" topmargin="0" margainheight="0">
    <object
    classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0" name="main"
    width="100%" height="100%" class="centerposition"
    id="your_movie">
    <param name="movie" value="your_movie.swf">
    <param name="bgcolor" value="#000000">
    <param name="quality" value="high">
    <param name="allowscriptaccess" value="samedomain">
    <embed
    type="application/x-shockwave-flash"
    pluginspage="http://www.macromedia.com/go/getflashplayer"
    name="your_movie"
    width="100%" height="100%"
    src="your_movie.swf"
    bgcolor="#FFFFFF"
    quality="high"
    swliveconnect="true"
    allowscriptaccess="samedomain"
    > <noembed> </noembed> </embed>
    </object>
    </center>
    </body>
    </html>

    wolf

  3. #3
    Senior Member
    Join Date
    Nov 2000
    Location
    Queenstown, New Zealand
    Posts
    480
    Ta for that Wolfgrass.

    Brian

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