Web Development and Design Foundations with XHTML, 5th Edition

(Steven Felgate) #1

FAQ


(^442) Chapter 11 Web Multimedia and Interactivity
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"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">




Hands-On Practice 11.4



Flash Sample


height="34" data="flashbutton.swf" title="Button links to the Adobe
Web site" >



This is a Flash button that links to the
Adobe Web site





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 [http://code.google.com/p/swfobject/wiki/documentation,](http://code.google.com/p/swfobject/wiki/documentation,) which uses JavaScript
to embed Flash content and is W3C XHTML standards compliant.
Free download pdf