HTML and CSS Reference
In-Depth Information
The Flash button on the page will animate when the mouse is placed on it and will link
to the Adobe Web site when clicked (if you are connected to the Internet while viewing
this page).
Let's get started. Create a folder called testflash on your disk. Copy the flashbutton.swf
file from the student files Chapter11 folder and save it in your testflash folder.
Next, launch Notepad and create the page that will display this Flash button. The
XHTML code follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http:/" lang="en" xml:lang="en">
<title>Hands-On Practice 11.4</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<h1>Flash Sample</h1>
<object type="application/x-shockwave-flash" width="147"
height="34" data="flashbutton.swf" title="Button links to the Adobe
Web site" >
<param name="movie" value="flashbutton.swf" />
<param name="quality” value="high" />
<param name="bgcolor” value="#FFFFFF" />
<p>This is a Flash button that links to the
<a href="">Adobe Web site</a>
Save your file in the testflash folder as flash.html and test it in a browser. Compare your
work to the sample in the student files (Chapter11/flash.html).
What will happen if the browser my Web page visitor uses does not
support Flash?
If you used the code in this section to display Flash media on a Web page and your visitor's
browser does not support Flash, the browser typically will display a message about needing a
missing plug-in. The XHTML code in this section passes W3C XHTML validation and is the
minimum code needed to display Flash media on a Web page. If you'd like more features, such
as being able to offer an express install of the latest Flash player to your visitors, explore
SWFObject at, which uses JavaScript
to embed Flash content and is W3C XHTML standards compliant.
Search WWH ::

Custom Search