PDA

View Full Version : HTML help


mrand01
09-17-2003, 12:55 PM
I feel so retarded asking this, but the fact is, I know a lot about flash, and nothing about HTML. How would I go about changed the background of an HTML document to a different color, and how would I make my SWF sit in the center of the window...like, not the top center, but dead center, both horizontally and vertically.

Thanks to anyone who answers

dzy2566
09-17-2003, 01:46 PM
Changing the background color is simple. All you have to do is edit the <body> tag. Add and set the bgcolor within the body tag.

e.g. <body bgcolor="#ffffff"> - set background for entire doc
e.g. <table bgcolor="#ffffff"> - set background color for a table
e.g. <td bgcolor="#ffffff"> - set background color for a table cell

The centering can be done with javascript, but is a little more complicated than this quick and dirty solution. When you publish you flash project, you can have HTML generated (I'm sure you knew this). If you go to edit that HTML, you will see that it is mostly contained between two <object> tags.

Paste this before the first <object> tag:

<table width="100%" height="100%" style="height:100%; width:100%" >
<tr>
<td align="center" style="text-align:center" >


And this after the </object> tag:

</td>
</tr>
</table>

That should take care of it. Any other questions or if I screwed something up, just holler.
:)

Make sure you save it as yourfile.html, if you're using notepad or another program that doesn't already recognize it as an html file, because you won't be editing your file, you'll be creating a new .txt file (or whatever extension it was opened in).

009
09-19-2003, 07:59 PM
i suggest you to use dreamweaver. play it around and it's very easy to use.
Originally posted by mrand01
I feel so retarded asking this, but the fact is, I know a lot about flash, and nothing about HTML. How would I go about changed the background of an HTML document to a different color, and how would I make my SWF sit in the center of the window...like, not the top center, but dead center, both horizontally and vertically.

Thanks to anyone who answers