51
1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

1

Web Developer & Design Foundations with XHTML

Chapter 11Web Media & Interactivity

Modified by Linda Kenney

Dec. 2, 2007

Page 2: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

2

© 2007 Pearson Education

Helper Applications& Plug-ins

• Helper Application– A program that can be designated to handle a

particular file type (such as .wav or.mpg) to allow the user to view or otherwise utilize the special file.

– The helper application runs in a separate window from the browser.

• Plug-In– A newer and more common method – Plug-ins run right in the browser window so that

media objects can be integrated directly into the web page.

Page 3: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

3

© 2007 Pearson Education

Commonly UsedPlug-ins

• Real Player

• Windows Media Player

• Apple QuickTime

• Adobe Reader

• Macromedia Flash Player

• Macromedia Shockwave Player

Page 4: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

4

© 2007 Pearson Education

Real Player

• http://real.com

• Plays streaming audio, video, animations, and multimedia presentations.

Page 5: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

5

© 2007 Pearson Education

Windows Media Player

• http://www.microsoft.com/windows/windowsmedia/download/

• Plays streaming audio, video, animations, and multimedia presentations.

Page 6: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

6

© 2007 Pearson Education

Apple QuickTime(with iTunes)

• http://www.apple.com/quicktime/download/win.html

• Displays QuickTime animation, music, MIDI, audio, video, and VR panoramas and objects directly within the Web page.

Page 7: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

7

© 2007 Pearson Education

Adobe Reader

• http://www.adobe.com/products/acrobat/readstep2.html

• Used to exchange information in .pdf format, such as brochures and documents.

Page 8: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

8

© 2007 Pearson Education

Macromedia Flash Player

• http://www.adobe.com/products/flashplayer/

• Displays .swf format files. These can contain audio, video, and animation along with interactivity.

Page 9: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

9

© 2007 Pearson Education

Macromedia Shockwave Player

• http://www.adobe.com/products/shockwaveplayer/

• Displays high-performance multimedia created using Macromedia Director.

Page 10: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

10

© 2007 Pearson Education

Audio File Types

• .wav Wave File

• .aiff Audio Interchange File Format

• .mid Musical Instrument Digital Interface (MIDI)

• .au Sun UNIX sound file

• .mp3 MPEG-1 Audio Layer-3

Page 11: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

11

© 2007 Pearson Education

Obtaining Audio Files

• Audio files can be obtained from various sources:– Record your own sounds or music– Download sounds or music from a free site– Download sounds or music from a site for a fee– Record music from a CD

• A commercial CD can only be copied for personal use and not for publishing to the Web. Contact the owner of the copyright to request permission to use the music.

– Purchase a CD of sounds or music. – There are some ethical issues related to using sounds

and music created by others. • Be certain to only publish sounds or music that you have

either created yourself or have obtained the rights (sometimes called a license) to publish.

Page 12: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

12

© 2007 Pearson Education

Downloading audio files

• http://office.microsoft.com/en-us/clipart/

• http://www.freeaudioclips.com/

• http://www.flashkit.com/soundfx/

Page 13: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

13

© 2007 Pearson Education

Downloading audio files (cont.)

• Audio files can be quite large/

• Make audio files as brief as possible

Page 14: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

14

© 2007 Pearson Education

Using Sound on a Web Page (1)

• Link to the sound<a href="ringing.wav" title=”Hear a

telephone ring.”>telephone ringing</a>

• If the visitor clicks on the link then the plug in for .wav files that is installed on their computer will display. They can then use the plug in to play the file.

Page 15: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

15

© 2007 Pearson Education

Using Sound on a Web Page (2)

• Embed the sound – You can embed the sound in a page

and optionally display a control panel for the sound

– The <embed> tag• Not part of the W3C standard but commonly

used

– The <object> tag• W3C standard but not well supported by

browsers

Page 16: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

16

© 2007 Pearson Education

XHTML <embed> tag

• A stand alone tag

• Attributes:– src– controls– width– height– autostart– loop– align– hidden

<embed src="catch.wav" autostart="false" controls="smallconsole" height="25" width="100" />

Page 17: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

17

© 2007 Pearson Education

• See http://pubpages.unh.edu/~ltv6/cs403/Chapter11/audio1.htm

• http://pubpages.unh.edu/~ltv6/cs403/Chapter11/audio3.htm

Page 18: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

18

© 2007 Pearson Education

XHTML <object> tag

• A container tag• Attributes:

– data– type– width– height– autostart– loop– hidden

<object data="catch.wav " autostart="false" height="50" width="100" type="audio/wav" ></object>

Page 19: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

19

© 2007 Pearson Education

• See

http://pubpages.unh.edu/~ltv6/cs403/Chapter11/audio2.htm

Page 20: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

20

© 2007 Pearson Education

Video File Types

• .mov Quicktime

• .avi Microsoft Audio Video Interleaved

• .wmv Windows Media File• .mpg MPEG (Motion Picture Experts

Group)

Page 21: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

21

© 2007 Pearson Education

Quicktime

• Originally created by Apple

• Also supported on Windows

• Widely used on the web

• Smart enough to begin to play before the entire file is loaded.

Page 22: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

22

© 2007 Pearson Education

Windows Media File

• Streaming video technology

• Windows Media Player supports this file format.

Page 23: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

23

© 2007 Pearson Education

MPEG (Motion Picture Experts Group)

• Supported on both Windows and Mac platforms

Page 24: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

24

© 2007 Pearson Education

Obtaining Video Files

• Video files can be obtained from various sources:– Record your own

• Digital Camcorder• Webcam• Copy video tapes using a video capture card

– Edit using Microsoft Movie Maker, Apple Quicktime, etc.

– Download from a free site– Download from a site for a fee– Purchase a DVD of stock videos– Here are some ethical issues related to using videos

created by others. • Be certain to only publish videos that you have either

created yourself or have obtained the rights (sometimes called a license) to publish.

Page 25: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

25

© 2007 Pearson Education

Using Video on a Web Page (1)

• Link to the video

<a href="sparky.mpg" title=”Video of dog barking”>Sparky! (Caution: long video download Mov 1.2MB)</a>

• Embed the video– You can embed the video in a page and optionally display a control panel for the sound.

Page 26: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

26

© 2007 Pearson Education

Using Video on a Web Page (2)

• Embed the video– You can embed the video in a page and

optionally display a control panel for the sound

– The <embed> tag• Not part of the W3C standard but commonly

used

– The <object> tag• W3C standard but not well supported by

browsers

Page 27: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

27

© 2007 Pearson Education

XHTML <embed> tag

• A stand alone tag

• Attributes:– src– controls– width– height– autostart– loop– align– hidden

<embed src="sparky.mpg" autostart="false" width="160" height="120" />

Page 28: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

28

© 2007 Pearson Education

See

• http://pubpages.unh.edu/~ltv6/cs403/Chapter11/video1.htm

• http://pubpages.unh.edu/~ltv6/cs403/Chapter11/ch11page4.htm

Page 29: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

29

© 2007 Pearson Education

XHTML <object> tag

• A container tag• Attributes:

– data– type– width– height– autostart– loop– hidden

<object data="sparky.mpg" type="video/mpeg" autostart="false" width="160" height="120" >A video displaying a cute Pekingese dog barking.</object>

Page 30: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

30

© 2007 Pearson Education

See

• http://pubpages.unh.edu/~ltv6/cs403/Chapter11/video2.htm

Page 31: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

31

© 2007 Pearson Education

Streaming Media

• A disadvantage to a regular audio or video file is that the web site visitor must wait for the entire file to download before beginning to experience it.

• Streaming media corrects this problem -- it begins to play almost immediately and uses "buffering" to capture the next portion of the file download.

• Three major components:– Authoring– Distribution– Playback

Page 32: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

32

© 2007 Pearson Education

Intro to RealNetworks (1) Streaming Media

• Authoring

• To create the streaming media you need software.

Page 33: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

33

© 2007 Pearson Education

Intro to RealNetworks (2) Streaming Media Distribution

• The web server needs software to handle the streaming media – such as checking connection speed and adjusting the stream to the available bandwidth. – Real System Server 8.

Page 34: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

34

© 2007 Pearson Education

Intro to RealNetworks (3) Streaming Media Playback

• Web page visitors whose browser is equipped with the Real Player plug-in will experience your streaming media.

• If the web site is using a RealNetworks server, the stream will be adjusted to the bandwidth available, otherwise a constant stream will be sent.

Page 35: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

35

© 2007 Pearson Education

Examples

• http://www.thedailyshow.com/index.jhtml

• http://www.whitehouse.gov/news/#

Page 36: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

36

© 2007 Pearson Education

Copyright Issuesand Media Files(1)

• It is very easy to copy and download an image, audio, or video file from a web site.

• It may be very tempting to reuse a file in one of your own projects, but that may not be ethical or lawful.

• Only publish web pages, images, and other media that you have personally created or have obtained the rights or license to use.

• If another individual has created an image, sound, video, or document that you believe would be useful on your own web site, ask permission to use the material instead of simply “grabbing” it.

Page 37: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

37

© 2007 Pearson Education

Copyright Issuesand Media Files(2)

• All work (web pages, images, sounds, videos, etc.) is copyrighted – even if there is no copyright symbol and date on the material.

• Be aware that there are times when students and educators can use portions of other’s work and not be in violation of copyright law – this is called “fair use”.

• "Fair use" is use of a copyrighted work for purposes such as criticism, reporting, teaching, scholarship, or research.

Page 38: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

38

© 2007 Pearson Education

Copyright Issuesand Media Files(3)

• Criteria used to determine “fair use”: The use must be educational and not commercial The nature of the work The amount copied must be as small of a portion of the

work as possible.  The copy does not impede the marketability of the original

work.

Page 39: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

39

© 2007 Pearson Education

What is Macromedia Flash?• Flash is a popular multimedia application

developed by Macromedia. • It is often used to create animation and

multimedia effects on web pages • Flash effects are saved in “.swf” files• .swf files play as they download and give

the perception of speedy display of complex graphic animations

• Flash requires a free browser plug-in, which is available for download from Macromedia

Page 40: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

40

© 2007 Pearson Education

How to createMacromedia Flash?

• “.swf” files can be created in a number of applications including

• Macromedia Flash, • Macromedia Fireworks, • Macromedia Dreamweaver, • Swish

Page 41: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

41

© 2007 Pearson Education

Common Uses ofMacromedia Flash

• Navigation

• Splash Screen

• Entire Web Site

Page 42: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

42

© 2007 Pearson Education

Adding Flash to a Web Page

• Both the <object> tag and the <embed> tag are used to place Flash media on a page.

• Some versions of currently popular browsers such as Netscape support the <embed> tag and do not fully support the <object> tag.

• Use the <noembed> tag to contain a text description of the Flash media in order to provide for accessibility.

Page 43: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

43

© 2007 Pearson Education

Example -- flash

See

• http://pubpages.unh.edu/~ltv6/cs403/Chapter11/flash.htm

Page 44: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

44

© 2007 Pearson Education

What is Java?

• Java is an Object Oriented Programming (OOP) language developed by Sun Microsystems.

• Java is not the same language as JavaScript.• Java is more powerful and much more flexible than JavaScript. • Java can be used to develop both stand-alone executable applications and applets

that are invoked by web pages.

Page 45: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

45

© 2007 Pearson Education

Common Usesof Java Applets

• Navigation Bars and Buttons• Image Effects• Text Effects• Games• Web and Business Applications

Page 46: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

46

© 2007 Pearson Education

Adding a Java Appletto a Web Page

• The applet tag• A container tag• Attributes:

– code, codebase, height, width, alt, id

• Works together with <parameter> tags– Stand alone tags– Attributes:

• name, value

• The <parameter> tags used by an applet are determined by the developer who writes and distributes the applet

Page 47: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

47

© 2007 Pearson Education

SampleJava Applet

<applet code=“myapplet.class" height=“50" width=“500“

alt=“Java applet: displays a moving logo with company name”>

<param name="bgColor" value="#FFFFFF" />

<param name=“txtColor" value="#0000CC” />

This Java applet displays a moving logo with the company name

</applet>

• The sample applet is named myapplet.class and requires two parameters, bgColor and txtColor.

Page 48: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

48

© 2007 Pearson Education

Java Examples

• http://pubpages.unh.edu/~ltv6/cs403/Chapter11/java.htm

• http://www.epa.gov/epaoswer/osw/kids/games/hiddenhints/wordsear.htm

• Or, search on the web.

Page 49: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

49

© 2007 Pearson Education

What is JavaScript?

• Object-oriented scripting language. • Used to work with the objects

associated with a web page document --the window, the document, the elements such as forms, images, links, etc

• JavaScript is NOT Java

Page 50: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

50

© 2007 Pearson Education

Common Usesof JavaScript

• Display a message box• Select list navigation• Edit and validate form information• Create a new window with a specified

size and screen position• Image Rollovers• Status Messages• Display Current Date• Calculations

Page 51: 1 Web Developer & Design Foundations with XHTML Chapter 11 Web Media & Interactivity Modified by Linda Kenney Dec. 2, 2007

51

© 2007 Pearson Education

JavaScript

• http://echoecho.com/javascript.htm• http://www.pageresource.com/jscript/

index4.htm

• http://javascript.internet.com/