I get the following warning in a ASP.NET project using the <embed
> tag to put a .swf:
Warning: Validation (XHTML 1.0 Transitional): Element 'embed' is not supported.
What is the "supported" way to do it instead???
The non-standard embed
tag is not supported in XHTML in favour of the standards based object
element. See http://www.bernzilla.com/item.php?id=681 for more information on this, but in a nutshell:
<object type="application/x-shockwave-flash" data="c.swf?path=movie.swf" width="400" height="300">
<param name="movie" value="c.swf?path=movie.swf" />
<img src="noflash.gif" width="200" height="100" alt="No Flash" />
</object>
Keep in mind though that using object
doesn't always work correctly in older browsers, so do a bit of testing using both formats first. A List Apart has a brilliant article on this called "Flash Satay: Embedding Flash While Supporting Standards" which shows you the cross browser way of implementing it as shown in the example above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With