A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: I can't get my Flash doc to center

  1. #1
    Senior Member
    Join Date
    Mar 2003
    Location
    New Orleans
    Posts
    191

    I can't get my Flash web doc to center on my browser

    Maybe this is more of an html question but I can't get my Flash web doc to be centered vertically opn my browser.

    Here's my code before the object tag:
    PHP Code:
    <center>
    <
    table cellpadding="0" cellspacing="0" border="0"><tr><td valign="center" align="center"
    Here is the site:
    http://www.caillouette.com/cyclesite2


    thanks
    Last edited by lelales; 04-12-2005 at 06:49 PM.
    I'm only in it for the pleasure

  2. #2
    Left-Handed Flash User mickbrit55's Avatar
    Join Date
    Nov 2003
    Location
    NJ USA
    Posts
    1,375
    Hello

    You mean centered in the webpage right?

    Open up the source for the page, find the <object> tags and put a <center> tag around them :

    <center><object>blah .... blah ... </object></center>

    Mick.

  3. #3
    Left-Handed Flash User mickbrit55's Avatar
    Join Date
    Nov 2003
    Location
    NJ USA
    Posts
    1,375
    ...thats messed up .... go to EDIT and view the answer ...

    Mick

  4. #4
    Pedro
    Join Date
    Nov 2003
    Location
    UK
    Posts
    69
    Edit your html file, make sure there isn't a DOCTYPE because that'll mess this up and change all the height and width attributes of the OBJECT and EMBED tags to 100%.

    Then put this AS on the first frame of your Flash movie:
    code:

    Stage.scaleMode = "noScale";
    Stage.align = "CM";

    "I feel like a king!"

  5. #5
    Senior Member
    Join Date
    Mar 2003
    Location
    New Orleans
    Posts
    191

    thanks Javahead but

    your solution did not work.

    Thanks any way
    I'm only in it for the pleasure

  6. #6
    Left-Handed Flash User mickbrit55's Avatar
    Join Date
    Nov 2003
    Location
    NJ USA
    Posts
    1,375
    It works every time, you are just doing it wrong.

    Mick

  7. #7
    Senior Member
    Join Date
    Aug 2004
    Posts
    289
    If you have Dreamweaver, it's quite simple. I never write the raw code but Dreamweaver generates this:

    <BODY bgcolor="#555555">
    <!-- URL's used in the movie-->
    <!-- text used in the movie-->
    <!--image viewersSeldom BlueSeldom BlueNOSTALGIACHAMPAGNE PANNIERSHARE THE PASSIONPASTICHE-->
    <div align="center">
    <OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
    WIDTH="800" HEIGHT="550" ALIGN="middle">
    <PARAM NAME=movie VALUE="index.swf">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=bgcolor VALUE=#555555>
    <EMBED src="index.swf" quality=high bgcolor=#555555 WIDTH="800" HEIGHT="550" ALIGN="middle"
    TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
    </OBJECT>
    </div><div align="center"> WIDTH="800" HEIGHT="550" ALIGN="middle">

    notice the references to "center" and "middle".

    Bluej2

  8. #8
    Senior Member
    Join Date
    Aug 2004
    Posts
    289
    <BODY bgcolor="#555555">
    <!-- URL's used in the movie-->
    <!-- text used in the movie-->
    <!--image viewersSeldom BlueSeldom BlueNOSTALGIACHAMPAGNE PANNIERSHARE THE PASSIONPASTICHE-->
    <div align="center">
    <OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
    WIDTH="800" HEIGHT="550" ALIGN="middle">
    <PARAM NAME=movie VALUE="index.swf">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=bgcolor VALUE=#555555>
    <EMBED src="index.swf" quality=high bgcolor=#555555 WIDTH="800" HEIGHT="550" ALIGN="middle"
    TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
    </OBJECT>
    </div>

    here you go...

  9. #9
    Senior Member
    Join Date
    Aug 2004
    Posts
    289
    <div align="center">
    is one...

    WIDTH="800" HEIGHT="550" ALIGN="middle">
    is another...

    <EMBED src="index.swf" quality=high bgcolor=#555555 WIDTH="800" HEIGHT="550" ALIGN="middle"
    the last...


    bluej2

  10. #10
    Senior Member
    Join Date
    Aug 2004
    Posts
    289
    sorry...I seem to have made a mess...check your pm's...leales

    bluej2

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