ptg16476052
Embedding Flash Using the <object> Tag 401
14
First, the version of the
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="780"
height="420">
The height and width attributes are necessary to define how much space the
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 play-
ers 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.
TIP
The element is used with
The preceding markup will work in Internet Explorer 8, embedding the Flash mov ie
named movie .swf. Here’s the markup for the
<object type="application/x-shockwave-flash" data="myContent.swf" width="780"
height="420">
For non-Internet Explorer browsers, you specify the plug-in to use with the type attri-
bute, 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.