What should I do to make my Flash site open in the center of the browser. I went to Publish Settings and done the HTML alignment, but it didn't worked... Any suggestions?
There is a dropdown menu that tells the HTML where to go on the site. There are two actually if I'm not mistaken. I think I used default/center and it worked well enough.
Where do I have to exactly put the <center> code??
I launched Dreamweaver and pasted it in my .html file after publishing it in Flash... It didn't work. Please, show me the step-by-step instructions, 'cos I'm really a beginner...
Go to the flash publish settings (file > publish settings) and make sure you have the html option selected. Then publish the swf and html files.
Open the html file that was created in a text/web page editor (eg dreamweaver, notepad etc) then somewhere between the opening <head> and closing </head> tags add the following,
and then just before the opening <object> tag in the page add
<div id="movie">
with a closing
</div>
just after the
</object>
tag.
This part of the css
position: absolute;
left: 50%; top: 50%;
positions the div tag containing the movie so that its top left corner is centred in the browser, to get the movie so the centre of the movie is in the centre of the browser we then nudge the movie up and to the left with some negative margins,
margin: -200px 0 0 -250px;
note that the value -200 should be minus half the height of your movie and the -250 should be minus half the width of your movie (so in this example the movie was 500 pixels wide and 200 pixels high) if your movie is a different size you'd need to adjust the values accordingly.
Thanks. It works, although I got two mini-problems.
My movie is 760x537, so according to your hints, I should have margins -360px and -268.5. Somehow it's not in the center but upper-middle sort of place. I wonder why...
The second thing is my Safari browser doesn't show any changes I did in web page editor, it doesn't allow JavaScript to work. Do you know is there any possibility to make Safari see the changes I did in html??
Ahh... I would be grateful if you could write how to make a html site to be in the center of a browser.