HTML and CSS Reference
The problem is that browsers use different methods to determine which plug-in should be
used to display the media linked to through the <object> tag.
First, the version of the <object> tag that works with Internet Explorer:
<object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000” width=”780”
<param name=”movie” value=”movie.swf” />
The height and width attributes are necessary to define how much space the <object>
will take up. The classid attribute identifies the ActiveX control that will be used to dis-
play the content in the browser. That long, random-looking collection of letters and num-
bers is the address of the ActiveX control in the Windows Registry. Your best bet is to
find an example of Flash embedding and copy it from there.
When you're specifying the height and width for a Flash movie, be
sure to take the size of the player into account, too. Some players
include a border, and nearly all of them provide controls for the
video playback. You need to account for these parts of the window
to make sure your video is shown at the resolution you anticipated.
The <param> element is used with <object> to provide additional information about the
content being embedded to the plug-in referenced by the <object> tag. The <param> ele-
ment has two attributes, name and value . This <param> element provides the Flash player
with the URL of the movie to be played.
The preceding markup will work in Internet Explorer, embedding the Flash movie named
movie.swf . Here's the markup for the <object> tag for other browsers:
<object type=”application/x-shockwave-flash” data=”myContent.swf” width=”780”
For non-Internet Explorer browsers, you specify the plug-in to use with the type attribute
and the URL of the movie to play with the data attribute. As you can see, the height
and width attributes are included here, too. The type attribute is used to provide an
Internet media type (or content type). The browser knows which content types map to
which plug-ins, so it can figure out whether you have the proper plug-in installed. If you
do, it can load it and render the content at the URL specified by the data attribute. In the
sidebar, I explain exactly what Internet media types are.