
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
1013
Appendix H
APPENDIX H
Embedding a Flash Movie
in a Web Page
To embed a Flash movie in a web page we use the HTML <EMBED> and <OBJECT> tags,
much like we use the
<IMG> tag to place a GIF or a JPEG on a page. Recent versions
of Internet Explorer (IE) for Windows (IE5.5 SP2 and later) require the
<OBJECT> tag
(the
<OBJECT> tag is also preferred over the <EMBED> tag even for earlier versions of IE
for Windows, which supported both tags). Internet Explorer for Macintosh and
Netscape on both platforms require the
<EMBED> tag, as do many minor browsers.
Therefore, to support all browsers, we nest the
<EMBED> tag within the <OBJECT> tag as
shown in Example H-1, which embeds a movie called main.swf in an HTML page.
Example H-1. <OBJECT> AND <EMBED> tags for embedding a .swf file in an HTML page
<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="550"
HEIGHT="400"
ID="main"
ALIGN="">
<PARAM NAME="movie" VALUE="main.swf">
<PARAM NAME="quality" VALUE="high">
<PARAM NAME="bgcolor" VALUE="#FFFFFF">
<EMBED
SRC="main.swf"
QUALITY="high"
BGCOLOR="#FFFFFF"
WIDTH="550"
HEIGHT="400"
NAME="main"
ALIGN=""
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"> ...