Groups | Blog | Home
all groups > macromedia flash sitedesign > september 2005 >

macromedia flash sitedesign : Aligning Flash .swf in HTML Page



dnc28
9/20/2005 12:00:00 AM
Hi!

Have a look at these sites.

http://www.untitledstudio.com/flash.htm

http://www.uniform.net/index2.html

Both these sites have a Flash .swf file embedded into a HTML webpage.

I want to achieve the same thing for my website. I have previously just used
Flash but this by default places the movie in the top right corner of the web
browser page. I know you can change this before publishing in Flash, but there
aren't many options, and excludes the option I want to achieve.

I want to be able to align my Flash movie so that it is centred vertically,
and centred horizontally. The Flash movie is 760 x 550 pixels. Is it possible
for someone to create the file for me so I can drop in my Flash movie? Can I
do this using Dreamweaver? Or any other method? Any written advice would also
be great!

Thanks!
pixelninja
9/21/2005 9:47:20 PM
The first site uses a frameset to achieve what you're looking for, and the
second uses layers. I say go with the second option. Much more simple and
elegant.

You're going to need to go in and manually tweek the html code that Flash
produces. After the BODY tag but before the OBJECT tag, put this code:

<div id="center_layer" style="position:absolute; width:762px; height:552;
z-index:1; left: 50%; top: 50%; margin-left: -381px; margin-top: -276px;
visibility: visible; overflow: visible;">

And then after the closing OBJECT put </div>

AddThis Social Bookmark Button