Specifications

CHAPTER 16
322
The <object> and <embed> tags support a set of properties that add additional functionality to the wrapper.
These properties let you change the appearance of the SWF file on the page or change some of its properties such
as the title or language. If you want to customize your wrapper, you can add these properties to the wrapper.
The
<object> tag is used by Internet Explorer 3.0 or later on Windows platforms or any browser that supports
the use of the Flash ActiveX control. The
<embed> tag is used by Netscape Navigator 2.0 or later, or browsers that
support the use of the Netscape-compatible plug-in version of Flash Player.
When an ActiveX-enabled browser loads the HTML page, it reads the values set on the
<object> and ignores the
<embed> tag. When browsers using the Flash plug-in load the HTML page, they read the values set on the
<embed> tag and ignore the <object> tag. Make sure that the properties for each tag are identical, unless you want
different results depending on the users browser.
You must set the values of four required properties as attributes in the <object> tag. The required properties are:
height
width
classid
codebase
All other properties are optional and you set their values in separate, named <param> tags.
Although the
movie property is technically an optional tag, without it, there is no reference to the application you
want the client to load. Therefore, your wrapper should always set the
movie parameter in the <object> tag.
The following example shows the required properties as attributes of the
<object> tag, and four optional
properties,
movie, play, loop, and quality, as <param> child tags:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100" height="100"
codebase="http://active.macromedia.com/flash7/cabs/ swflash.cab#version=9,0,0,0">
<param name="movie" value="moviename.swf">
<param name="play" value="true">
<param name="loop" value="true">
<param name="quality" value="high">
</object>
For the <embed> tag, all settings are attributes that appear between the angle brackets of the opening <embed> tag.
The
<embed> tag requires the height and width attributes, and the pluginspage attribute, which is the equiv-
alent of the
<object> tag’s codebase property. The <embed> tag does not require a classid attribute. As with
the
movie parameter of the <object> tag, the src attribute of the <embed> tag provides the reference to the Flex
application. Without it, there would be no SWF file, so you should consider it a required attribute.
Although the codebase and pluginspage properties are required, they are not necessarily used if you use Flash
Player Detection Kit to detect and install the required version of Flash Player. For more information, see “Using
Express Install” on page 333.