# Dynamically centering a large swf in an HTML page?

**URL:** <https://forum.kirupa.com/t/dynamically-centering-a-large-swf-in-an-html-page/19664>\
**Category:** Uncategorized\
**Created:** [April 30, 2003, 10:20am UTC](https://forum.kirupa.com/t/dynamically-centering-a-large-swf-in-an-html-page/19664 "2003-04-30T10:20:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pixi](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@pixi](https://forum.kirupa.com/u/pixi)\
**Post date:** [April 30, 2003, 10:20am UTC](https://forum.kirupa.com/t/dynamically-centering-a-large-swf-in-an-html-page/19664/1 "2003-04-30T10:20:38Z")

</div>

Hi guys , apart from the obvious : creating a table , aligning centre commands etc…

I have a 1600 x 1200 swf, the main content sits top centre in this movie…normally flash uses the top left as proxy for alignment…

this means that when I centre the movie…the content which is ( in the centre of the swf ), sits off sceen at a smaller res…

I need to dynamically centre the swf into an HTML page, wrapping the rest of the swf " under" the browser…

So I need some code that at runtime checks its width in relation to the screensize , from within the swf and dynamically centres…with no scrollbars horizontally…only vertically …

HA ! Ive been pulling my hair out, if ANYONE CAN HELP\>\>\>  
PLEASE \>\>I BOW AND SCRAPE ON BENDED KNEE !!!

pix .  
:skull: :skull: :skull:
