Hello,
To embed a simple flash file into your site and keep it fully validated, you can use the following codes depending on the DOCTYPE that has been defined.
For HTML 4.01 Transitional:
Code:
<object data="path_to_file/file.swf" type="application/x-shockwave-flash" width="insert_width_of_movie" height="insert_height_of_movie">
<param name="movie" value="path_to_file/file.swf">
</object>
For HTML 4.01 Strict (requires a container around code):
Code:
<div class="cFlashMovie">
<object data="path_to_file/file.swf" type="application/x-shockwave-flash" width="insert_width_of_movie" height="insert_height_of_movie">
<param name="movie" value="path_to_file/file.swf">
</object>
</div>
If you do not wish to assign a CSS Class or ID to the Div, then just use
around the flash code. Alternatively, you may use various other containers such as
.
For XHTML 1.0 Transitional (requires self-closing end to param):
Code:
<object data="path_to_file/file.swf" type="application/x-shockwave-flash" width="insert_width_of_movie" height="insert_height_of_movie">
<param name="movie" value="path_to_file/file.swf" />
</object>
For XHTML 1.0 Strict (requires a container around code):
Code:
<div class="cFlashMovie">
<object data="path_to_file/file.swf" type="application/x-shockwave-flash" width="insert_width_of_movie" height="insert_height_of_movie">
<param name="movie" value="path_to_file/file.swf" />
</object>
</div>
Those are four validated flash embed codes for the most common DOCTYPES used in Web Development. These will validate fine as long as the rest of your code is good. Hopefully this post helps people in the future.