A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: SWF vs Browser window

  1. #1
    Junior Member
    Join Date
    Jan 2003
    Posts
    25

    SWF vs Browser window

    Well, I finished my website (all done with flash5), published it and everything worked just fine but one think that I dont know how to make, how can I make my swf appear in the center of the browser window not in the upper left corner???
    Is anyone have a clue?
    Help is very appreciated.
    thanx guys.
    No hate. No violence. Races? Only one Human race.
    United We Stand, Divided We Fall.
    Only one ennemy
    Know Your enemy

  2. #2
    Senior Member nepdude's Avatar
    Join Date
    Feb 2001
    Location
    Canada
    Posts
    960
    create a table and insert the flash file in it like so:
    Code:
    <html><head><title>whatever</title></head>
    
    <body>
    
    <table align="center">
    <tr>
    <td align="center" valign="middle">
    <object>
    ....
    ....
    </object>
    </td></tr></table>
    
    </body></html>
    nObOdY dIeS A vIrGiN,
    LIfE sCrEwS uS aLL

  3. #3
    Junior Member
    Join Date
    Jan 2003
    Posts
    25
    I used the code you posted, but all I got is a blank screen, but I could hear the sound of the movie though, So I don't know, but it doesn't seem to work, do you guys have any other suggestions?
    thanx for your time.
    No hate. No violence. Races? Only one Human race.
    United We Stand, Divided We Fall.
    Only one ennemy
    Know Your enemy

  4. #4
    AFX == P. Forsberg
    Join Date
    Nov 2001
    Posts
    439

    HTML centering

    Hey. The centering of your .swf is up to the HTML page that is calling it. The code listed by NepDude might not be exact, but contains what you need to know. Look at the code and integrate it into the HTML page you have that is working. It's all there and you'll be stoked to find the error.
    Good luck.

  5. #5
    Senior Member nepdude's Avatar
    Join Date
    Feb 2001
    Location
    Canada
    Posts
    960
    made some changes
    Code:
    <html><head><title>whatever</title></head>
    
    <body>
    
    <table width="100%" height="100%">
     <tr>
      <td align="center" valign="middle">
       <object>
       ....
       ....
       </object>
      </td>
     </tr>
    </table>
    
    </body></html>
    nObOdY dIeS A vIrGiN,
    LIfE sCrEwS uS aLL

  6. #6
    Junior Member
    Join Date
    Jan 2003
    Posts
    25
    There you go, it works, thank you very much.
    I also realised that I could do it through dreamweaver, you create a table and then you can insert you swf inside the table and align the table in the middle.. cool
    see you guys later for another challenge.
    No hate. No violence. Races? Only one Human race.
    United We Stand, Divided We Fall.
    Only one ennemy
    Know Your enemy

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