Web Design with HTML and CSS

(National Geographic (Little) Kids) #1
Interactivity on the web

Lesson 10, Introduction to Interactivity 231

7 Choose File > New and then choose Edit > Paste to paste this code into the new
document. Choose File > Save. In the dialog box that appears, name your fi le
fl ashObjectCode.html. Save this fi le into the swfobject folder. This is important
because there is a generated <script> element that links to the external JavaScript fi le
swfobject.js, so your HTML fi le needs to be in the same folder.
8 Preview the page in your browser to see your Flash fi le play.

The sample Flash animation running in your browser.

Close your browser when you are done, and return to your text editor. Keep this fi le open
because you will use it in the next exercise.
You have successfully generated the code to play Flash content. If you want to add Flash
content to an existing page, you don’t need to use all the code from the Flash generator every
time you want to add a Flash fi le to a page. You can copy and paste the code you need into a
pre-existing page. You’ll do that now to add a Flash fi le to a page from your Smoothie site.

Free download pdf