Skip Navigation.

Adding Flash to Web pages

Now that you've learned how to make Flash movies and animate them, you will want to add them to your pages. Unfortunately, the HTML code involved in doing so is LONG and annoying, so rather than explaining all the code you need and how to enter it, we give the basics here, along with an example you can cut and paste into your document.

For more complete information about adding Flash movies to your site, consult the Flash Instruction Manual in the IMAGE lab.

The EMBED tag

The EMBED tag is the Netscape tag used to add flash (or quicktime) documents to your pages. It is a single tag with many attributes, followed quickly by its own close tag. Attributes you will need to add are: HEIGHT, WIDTH, SouRCe, and LOOP. Here is a sample EMBED tag:

<EMBED SRC="zoom.swf" WIDTH="300" HEIGHT="200" PLAY="true" LOOP="true" QUALITY="high" PLUGINSPACE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>

Information you should set for yourself has been highlighted with red type.

The OBJECT tag

Internet Explorer has adopted a different tag to be used when inserting Flash into websites. The OBJECT tag supplies a few attributes (like WIDTH and HEIGHT) but also uses separate "parameters" to include further information. Again, you need to supply a number of pieces of information. The code for an OBJECT tag is below:

<OBJECT CLASSID="clsid:D27CDB6E-AE6D11cf-96B8-444553540000" WIDTH="300" HEIGHT="200" CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0">
<PARAM NAME="movie" VALUE="zoom.swf">
<PARAM NAME="PLAY" VALUE="true">
<PARAM NAME="LOOP" VALUE="true">
<PARAM NAME="QUALITY" VALUE="high">
</OBJECT>

Information you should set for yourself has been highlighted with red type.

Using both tags

Of course, most of us want our web pages to show up on both Internet Explorer and Netscape. In order to insure that, we need to use BOTH tags, one nested inside the other. An example is below. Note that the information you will need to supply has been highlighted in red type.

<OBJECT CLASSID="clsid:D27CDB6E-AE6D11cf-96B8-444553540000" WIDTH="300" HEIGHT="200" CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0">
<PARAM NAME="movie" VALUE="zoom.swf">
<PARAM NAME="PLAY" VALUE="true">
<PARAM NAME="LOOP" VALUE="true">
<PARAM NAME="QUALITY" VALUE="high">

<EMBED SRC="zoom.swf" WIDTH="300" HEIGHT="200" PLAY="true" LOOP="true" QUALITY="high" PLUGINSPACE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>

</OBJECT>

Back