I've designed a website in flash but I don't know how to center it horizontally as well as vertically. I know that if I ad a <center> tag, that centers it horizontally only. Does anyone know how to center it so that when you re-scale your browser, the website remains centered horizontally and vertically?
The code at the moment is this:
<title>main</title>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<center>
<object classid="clsid:d28cdb6e-ae6d-12cf-97b7-444772540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="910" height="500" id="main" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="main.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="main.swf" quality="high" bgcolor="#ffffff" width="910" height="500" name="main" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</center>
</body>
</html>
Change your width and height to percentages (100% on both)
If you mean when you publish the movie out of Flash - don't. It blows all the fonts, pictures, everything and looks horrible.
If you want to hvae a liquid site in flash it is possible. You use the Stage object and more specfically the Stage.onResize() function. You are then in the business of dynamically attaching movieclips from the library.
There are some good tutoriasl out these, I can't remember the urls at the mo, but the help in Flash isn't too bad for the Stage object.
I meant what i said, create the swf then alter the html to 100% width and height, it doesnt affect the formatting and looks exactly the same on all screens. I create flash website on a 17" and can view it in 14",15",17",19" etc. It doesnt matter at all what resolution/screen size you use
99 little bugs in the code, 99 bugs in the code, fix one bug, compile it again ... 101 little bugs in the code
We'll have to agree to disagree worthyashes as ive set the swf to 100% on alot of sites and never had a problem before but i was suggesting to alter the table (ie. html) to 100%. Ive done that before as well and works fine
Anyway looking at the site again through firefox 1.5 i dont have a problem with alignment at all, only with the height as i get a small scroll.
Last edited by wh666-666; 08-15-2006 at 06:22 AM.
99 little bugs in the code, 99 bugs in the code, fix one bug, compile it again ... 101 little bugs in the code
Bookmarks