HTML and CSS Reference
In-Depth Information
Because the embed element has never been officially included in HTML (though it has been widely supported),
any level of validation will find it. Alternatively, you can just do a quick search for <embed to find all the places
you have to fix.
Embedded Flash animations usually have the offending embed element wrapped in an object element, because
that's what the Flash authoring environment generates. However, this object element only works for some
browsers, and you'll need to modify it to make it work for all of them.
Usually the object tag you start with looks like this:
<object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/
swflash.cab#version=8,0,0,0"
width="160" height="600" id="banner" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="banner.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#006699" />
</object>
This is suitable for Internet Explorer but not for most other browsers. To make it work elsewhere you need to
make these changes.
Add a type="application/x-shockwave-flash" attribute.
Add a data attribute that points to the movieā€”for example, data="banner.swf" .
Remove the codebase attribute.
Remove the align attribute. Use CSS float properties instead. Add an id attribute for this property to
attach to.
The result looks like this:
<object id="flash23"
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
type="application/x-shockwave-flash"
width="160" height="600" id="banner">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="banner.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#006699" />
</object>
Other embedded content, such as QuickTime movies, may not be so conveniently wrapped. In this case, you will
need to construct your own equivalent object element to replace it. Some of the attributes of the embed
element map more or less directly to attributes of the object element or to CSS properties, as shown in Table
4.1 .
Search WWH ::




Custom Search