You must have noticed that when you put any Flash animation (SWF) in your site and when you are going to Validate your site from W3C Validator (validator.w3.org), it always give Error for Flash. So you want to place Flash animation too on your site and also wanted that it should validate. So here are some code which will be Validated from W3C Validator.

1. If you want to put Flash Animation (SWF) file in your website, don’t paste it directly. In HTML File just goto that place where you want to put Flash Animation, (whether in DIV or Table).

2. Paste these Codes there:

<!– Code Starts Here–>

<script type=”text/javascript” src=”swfobject.js”></script>
<div id=”flashanimation”>
<object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0” width=”500″ height=”200″>
<param name=”movie” value=”stunning-mesh.swf”>
<param name=”quality” value=”high”>
</object>
</div>
<script type=”text/javascript”>
var so = new SWFObject(“stunning-mesh.swf”, “mymovie”, “500”, “200”, “8”, “#FFFFFF”);
so.write(“flashanimation”);
</script>

<!– Code Ends Here–>

Where:

stunning-mesh.swf is the name of you SWF file

“500” is the width of your SWF File

“200” is the Height of your SWF File

“FFFFFF” is the Background of the Flash Contents.

Notes:

a. NO NEED TO CHANGE OTHER THINGS

b. If you want to put more than 1 Flash in one page, then don’t forget to change the name of “flashanimation” DIV for each flash, like “flashanimation1” or “flashanimation2” etc.

3. Now put swfobject.js file in the same place where SWF file is. You can download swfobject.js file by clicking here [swfobject.js]