Embed Flash and Video via the object Tag

Embed Windows Media Player via the object tag

Here is the general format for including .wmv files in web pages:

<object type="video/x-ms-wmv" data="http://www.domain.com/path/to/winmovie.wmv" width="340" height="280">
  <param name="src" value="http://www.domain.com/path/to/winmovie.wmv" />
  <param name="controller" value="true" />
  <param name="autostart" value="true" />
</object>

Embed Windows Media Player via object and classid

Here is the general format for including .wmv files in web pages using classid:

<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" id="player" width="340" height="280">
  <param name="url" value="http://www.domain.com/path/to/winmovie.wmv" />
  <param name="src" value="http://www.domain.com/path/to/winmovie.wmv" />
  <param name="showcontrols" value="true" />
  <param name="autostart" value="true" />
  <!--[if !IE]>-->
  <object type="video/x-ms-wmv" data="http://www.domain.com/path/to/winmovie.wmv" width="340" height="280">
    <param name="src" value="http://www.domain.com/path/to/winmovie.wmv" />
    <param name="controller" value="true" />
    <param name="autostart" value="true" />
  </object>
  <!--<![endif]-->
</object>

[Alternate version]:

<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="application/x-oleobject" width="340" height="280" 
        codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902">
  <param name="filename" value="http://www.domain.com/path/to/winmovie.wmv" />
  <param name="showcontrols" value="true" />
  <param name="autostart" value="true" />
  <!--[if !IE]>-->
    <object data="http://www.domain.com/path/to/winmovie.wmv" width="340" height="280" type="application/x-mplayer2">
      <param name="pluginurl" value="http://www.microsoft.com/Windows/MediaPlayer/" />
      <param name="controller" value="true" />
    </object>
  <!--<![endif]-->
</object>

Embed Google and YouTube Videos via the object tag

Here is the general format for including Google and YouTube Videos in web pages:

<object type="application/x-shockwave-flash" data="http://video.google.com/googleplayer.swf?8755581808731033658" width="400" height="326" id="VideoPlayback">
  <param name="movie" value="http://video.google.com/googleplayer.swf?docId=8755581808731033658" />
  <param name="FlashVars" value="playerMode=embedded" />
  <param name="allowScriptAcess" value="sameDomain" />
  <param name="scale" value="noScale" />
  <param name="quality" value="best" />
  <param name="bgcolor" value="#FFF" />
  <param name="salign" value="TL" />
</object>

Embed QuickTime Movies via the object tag

Here is the general format for including QuickTime Movies in web pages*:

<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="340" height="280">
  <param name="src" value="http://www.domain.com/path/to/qtmovie.mov" />
  <param name="pluginspage" value="http://www.apple.com/quicktime/download/" />
  <param name="controller" value="true" />
  <param name="autoplay" value="false" />
  <!--[if !IE]>-->
  <object type="video/quicktime" data="http://www.domain.com/path/to/qtmovie.mov" width="340" height="280">
    <param name="pluginurl" value="http://www.apple.com/quicktime/download/" />
    <param name="controller" value="true" />
    <param name="autoplay" value="false" />
  </object>
  <!--<![endif]-->
</object>

*Note: QuickTime movies will not autoplay in IE using this method.

Embed Flash via object and embed

Here is a generalized version of the standard method of including Flash content in web pages:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="400" height="300" id="movie" align="center">
   <embed src="movie.swf" quality="high" width="400" height="300" name="movie" align="center" type="application/x-shockwave-flash" plug inspage="http://www.macromedia.com/go/getflashplayer" />
   <param name="movie" value="movie.swf" /> 
</object>

Embed Flash via the object tag

Here is the first step for including Flash content in web pages using only the object tag:

<object type="application/x-shockwave-flash" data="container.swf?path=movie.swf" width="400" height="300">
   <param name="movie" value="container.swf?path=movie.swf" />
</object>

Using the code above, you will also need to create and use a "container" movie. The container movie serves only to launch the actual movie that you wish to display. Simply place the actual Flash movie into the first frame of an otherwise blank "container.swf" movie and add the following code to the same frame:

_root.loadMovie(_root.path,0);

The previous code snippet inserted into the first frame of a Flash movie is equivalent to:

_root.loadMovie("movie.swf",0);

The final step for including Flash content using this method compensates for the removal of the codebase attribute. The codebase attribute prompts the browser to upgrade or install the player, if required. To provide this functionality to users, include a blank Flash movie via the standard method (above) and call it from the site index or other strategic location.

[Alternate version]:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="300" 
        codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0">
  <param name="movie" value="movie.swf" />
  <param name="bgcolor" value="#ffffff" />
  <param name="quality" value="high" />
  <!--[if !IE]>-->
    <object data="movie.swf" width="400" height="300" type="application/x-shockwave-flash">
      <param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer" />
      <param name="bgcolor" value="#ffffff" />
      <param name="quality" value="high" />
    </object>
  <!--<![endif]-->
</object>

Embed "small" Flash movies via the object tag

Using the method just described, it is possible to include small Flash movies (ads, deco, buttons, etc.) without using a container file:

<object type="application/x-shockwave-flash" data="movie.swf" width="400" height="300">
   <param name="movie" value="movie.swf" />
</object>

Serve alternate content for users without Flash

Here are two generalized methods for including alternate content for users without Flash. The first method employs a container movie.

<object type="application/x-shockwave-flash data="c.swf?path=movie.swf" width="400" height="300">
   <param name="movie" value="container.swf?path=movie.swf" />
   <img src="no-flash.gif" width="400" height="300" alt="Get Flash Player" />
</object>
<object type="application/x-shockwave-flash" data="movie.swf" width="400" height="300">
   <param name="movie" value="movie.swf" />
   <param name="quality" value="high" />
   <param name="menu" />
   <div id="menu">
    <ul>
     <li><a href="http://domain.com/index.php" title="Go to the home page">Home</a></li>
     <li><a href="http://domain.com/archive.php" title="Go to the archive page">Home</a></li>
     <li><a href="http://domain.com/about.php" title="Go to the about page">Home</a></li>
     <li><a href="http://domain.com/faq.php" title="Go to the FAQ page">Home</a></li>
    </ul>
   </div>
</object>