Flash CS3  |  Go to CS4 Help

Using object and embed tags

To display a SWF file in a web browser, an HTML document must use the object and embed tags with the proper parameters.
Note: You can generate an HTML document using the correct object and embed tags using the Publish settings dialog box, and selecting the HTML option. For more information, see Specify settings that create HTML documents with embedded Flash content.

For object, four settings (height, width, classid, and codebase) are attributes that appear in the object tag; all others are parameters that appear in separate, named param tags, as shown in the following example:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100"
height="100" codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/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 (such as height, width, quality, and loop) are attributes that appear between the angle brackets of the opening embed tag, as shown in the following example:

<embed src="moviename.swf" width="100" height="100" play="true" 
loop="true" quality="high"
pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> 
</embed>

To use both tags, position the embed tag before the closing object tag, as shown in the following example:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100"
height="100" codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/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">
<embed src="moviename.swf" width="100" height="100" play="true” 
loop="true" quality="high" 
pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> 
</embed>
</object>
Note: If you use the object and embed tags, use identical values for each attribute or parameter to ensure consistent playback across browsers. The swflash.cab#version=9,0,0,0 parameter is optional; only omit this parameter if you don’t want to check for the version number.

Comments

Comments are no longer accepted for Flash CS3. Flash CS4 is the current version. To discuss Flash CS3, please use the Adobe forum.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/UsingFlash/WSd60f23110762d6b883b18f10cb1fe1af6-7ba8.html