Adding Flash to Your Page
Flash is a little more difficult to include on a web page than
javascript was but not significantly more difficult.
Understanding Flash
Flash programs exist separately from our web pages and we place
instructions within our web pagse telling it where to find the flash
programs. You will be including the frogger game you saw on the prior
page to one of your web pages. These steps however will work for most
flash progams you might find out the internet. Free flash programs are
not nearly as common as javascript programs are but they do exists and
can be found with some careful searches.
As before you can include the flash on an existing page or create a new
one to showcase your flash abilites. In either case be sure a link
exists from your index.html page to the page that contains the flash.
Save the following programming by right clicking on the link and
saving the link to your USB memory stick (or the Desktop if you do not have a USB drive). This file is called
frogger.swf and contains in an unreadable form the flash version of
frogger. IMPORTANT: Be sure you save it to the same directory as the file you will
be embedding it in. NVU will transfer this file automatically for us
when we publish our web page.
Embedding the program within your web page
To actually have your web page execute the frogger program you will
need to go into the Source of the html file that you want to add to and then
copy and paste the following lines into the body of your web page
<center>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
id="frogger" align="middle" height="300"
width="400"><param name="allowScriptAccess"
value="sameDomain"><param name="movie"
value="frogger.swf"><param name="quality"
value="high"><param name="bgcolor" value="#ffffff">
<embed src="frogger.swf" quality="high"
bgcolor="#ffffff" name="frogger"
allowscriptaccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"
align="center" height="300" width="400"></object></center>
Now you should be able to save and publish your web page. When you
publish your page be sure that you check on the "Include images and
other files" checkbox, and the specify that your want them stored in
the same directory.
Open your page
up within a browser window to verify that everything works correctly.
Return to Web Development III