 2005 Pearson Education, Inc. All rights reserved. 1 21 Multimedia: Applets and Applications.

Slides:



Advertisements
Similar presentations
3.01C Multimedia Elements and Guidelines 3.01 Explore multimedia systems, elements and presentations.
Advertisements

 2004 Prentice Hall, Inc. All rights reserved. Chapter 28 – Multimedia: Audio, Video, Speech Synthesis and Recognition Outline 28.1 Introduction 28.2.
Using Multimedia on the Web Enhancing a Web Site with Sound, Video, and Applets.
CNIT 132 – Week 9 Multimedia. Working with Multimedia Bandwidth is a measure of the amount of data that can be sent through a communication pipeline each.
Section 9.1 Identify multimedia design guidelines Identify sources of multimedia files Explain the ethical use of multimedia files Describe multimedia.
MULTIMEDIA DEVELOPMENT 4.3 : AUTHORING TOOLS. At the end of the lesson, students should be able to: 1. Describe different types of authoring tools Learning.
Sounds, Images & Other Objects Website Production.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved What is Multimedia? Multimedia.
1 L45 Multimedia: Applets and Applications. 2 OBJECTIVES  How to get and display images.  To create animations from sequences of images.  To create.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter Java Multimedia: Images, Animation, Audio.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 16 Applets.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved L06 (Chapter 16) Applets.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 14 Applets, Images,
 Pearson Education, Inc. All rights reserved Multimedia: Applets and Applications.
Outline of Presentation Introduction of digital video libraries Introduction of the CMU Informedia Project Informedia: user perspective Informedia:
1 Flash and Animation Presented by : Behzad Sajed Khosrowshahi.
Tutorial 7 Working with Multimedia. XP Objectives Explore various multimedia applications on the Web Learn about sound file formats and properties Embed.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved L05 (Chapter 16) Applets.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft PowerPoint 2002 Working with External.
HYPERTEXT MARKUP LANGUAGE (HTML)
© 2010 Delmar, Cengage Learning Chapter 6: Preparing and Publishing Movies.
Graphics and Multimedia In visual Studio. Net (C#)
Section 9.1 Section 9.2 YOU WILL LEARN TO…
Skill Area 212 Introduction to Multimedia Internet and MultiMedia for SC 2.
© 2011 Delmar, Cengage Learning Chapter 11 Adding Media and Interactivity with Flash and Spry.
Graphics and Multimedia. Outline Introduction to Multimedia Loading, Displaying and Scaling Images Windows Media Player Adding a Flash Movie Microsoft.
Computer Science [3] Java Programming II - Laboratory Course Lab 7: Multimedia: Applets and Applications Faculty of Engineering & IT Software Engineering.
Chapter 14-Designing for the World Wide Web. Overview Introducing multimedia on the Web. Designing text for the Web. Creating images for the Web. Adding.
1 CP586 © Peter Lo 2003 Multimedia Communication Standards and Delivery Methods.
Java Programming, 2E Introductory Concepts and Techniques Chapter 2 Creating a Java Application and Applet.
CHAPTER 2 Communications, Networks, the Internet, and the World Wide Web.
Chapter 11-Multimedia Authoring Tools. Overview Introduction to multimedia authoring tools. Types of authoring tools. Cross-platform authoring notes.
MULTIMEDIA M U A T H H U M A I D R a s h A t a l l a h.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 65 – Manipulating Data Using Methods – Java Applet.
1 SEG3120 Analysis and Design for User Interfaces Flash Anis Zarrad Parallel Simulations and Distributed Systems (PARADISE) Research Laboratory SITE, University.
 2002 Prentice Hall, Inc. All rights reserved. Chapter 18 – Multimedia: Images, Animation, Audio and Video Outline 18.1 Introduction 18.2 Loading, Displaying.
Applets Chapter 17.  Java’s big splash onto the scene came in the mid 90’s. The people at Sun Microsystems had managed to work java programs into Web.
Tutorial 7 Working with Multimedia. XP Objectives Explore various multimedia applications on the Web Learn about sound file formats and properties Embed.
Multimedia and The Web.
Chapter 13-Tools for the World Wide Web. Overview Web servers. Web browsers. Web page makers and site builders. Plug-ins and delivery vehicles. Beyond.
Chapter 17: Applets, Images, and Sound. Objectives Learn about applets Write an HTML document to host an applet Use the init() method Work with JApplet.
Tutorial 7 Working with Multimedia
Tutorial 7 Designing a Multimedia Web Site
Tutorial 7 Working with Multimedia. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Explore various multimedia applications.
Tutorial 7 Working with Multimedia. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Explore various multimedia applications.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 3 Welcome Application Introduction to Visual Programming.
 2000 Prentice Hall, Inc. All rights reserved. Java Multimedia: Images, Animation, Audio and Video Outline 30.1 Introduction 30.2Loading, Displaying and.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 16 Applets and Multimedia.
Introduction to Flash Animation CS 318. Topics Introduction to Flash and animation The Flash development environment Creating Flash animations  Layers.
5-1 OBJ Copyright 2003, Paradigm Publishing Inc. Adding Sound, Video, and Basic Interactivity with Buttons Macromedia Flash Design & Application.
Multimedia and the Web.
Java Programming Working with Sound and Images. Topics Learn about the paint() and repaint() methods Learn about paintComponent() method Use the drawString()
Chapter 14 Applets and Advanced GUI  The Applet Class  The HTML Tag F Passing Parameters to Applets F Conversions Between Applications and Applets F.
16.9 Introduction to Multimedia Visual Basic offers many convenient ways to include images and animations in programs Computing field decades ago mainly.
Chapter 16 Multimedia F Audio Files F Playing Audio F Running Audio on a Separate Thread F Displaying Images F Displaying a Sequence of Images  Using.
1 A Basic Introduction to Flash. Outline What is a flash? Macromedia Flash MX 2004 Flash concepts Flash Demos Conclusion Additional help 2.
Creating a Java Application and Applet
Video 2 Subject:T0934 / Multimedia Programming Foundation Session:11 Tahun:2009 Versi:1/0.
Chapter 8 Adding Multimedia Content to Web Pages HTML5 & CSS 7 th Edition.
CHAPTER 8 Multimedia 1. Using Multimedia ❖ Multimedia: the combination of text, sound, and video to express an idea or convey a message. ❖ Podcasts: a.
Chapter 10 Multimedia and the Web.
Features of Authoring Tools
VIDEO.
Enhancing Your Presentation with Multimedia
CHAPTER 8 Multimedia Authoring Tools
Outline Introduction Audio and Video
3.01C Multimedia Elements and Guidelines
Working with Multimedia
3.01C Multimedia Elements and Guidelines
Presentation transcript:

 2005 Pearson Education, Inc. All rights reserved Multimedia: Applets and Applications

 2005 Pearson Education Inc. All rights reserved. 2 The wheel that squeaks the loudest … gets the grease. — John Billings (Henry Wheeler Shaw) We'll use a signal I have tried and found far- reaching and easy to yell. Waa-hoo! — Zane Grey There is a natural hootchy-kootchy motion to a goldfish. — Walt Disney Between the motion and the act falls the shadow. — Thomas Stearns Eliot

 2005 Pearson Education, Inc. All rights reserved. 3 OBJECTIVES In this chapter you will learn:  How to get and display images.  To create animations from sequences of images.  To create image maps.  To get, play, loop and stop sounds, using an AudioClip.  To play video using interface Player.

 2005 Pearson Education, Inc. All rights reserved Introduction 21.2 Loading, Displaying and Scaling Images 21.3 Animating a Series of Images 21.4 Image Maps 21.5 Loading and Playing Audio Clips 21.6 Playing Video and Other Media with Java Media Framework 21.7 Wrap-Up 21.8 Internet and Web Resources

 2005 Pearson Education, Inc. All rights reserved Introduction Multimedia – the “sizzle” of Java – Sound, images, graphics and video – An enormous programming field – Demands extraordinary computing power Many computer users now want three-dimensional, high- resolution, color graphics Java provides extensive multimedia facilities, including: – Java 3D API – for creating 3D graphics applications – JMF API – for adding audio and video to an application – Java Sound API – for playing, recording and modifying audio – Java Speech API – for inputting and outputting voice commands

 2005 Pearson Education, Inc. All rights reserved Loading, Displaying and Scaling Images Classes Image and ImageIcon – used to load and display images Displaying images – Graphics method drawImage – used to draw image referenced by Image object (can be scaled) – ImageIcon method paintIcon can be used to draw image referenced by ImageIcon object Loading images – Applet method getImage loads an Image into an applet – Applet method getDocumentBase returns location of applet’s HTML file on Internet – ImageObserver s receive notifications as Image is loaded and update image on screen if it was not complete when displayed Java supports several image formats, including GIF, JPEG and PNG

 2005 Pearson Education, Inc. All rights reserved. 7 Outline LoadImageAnd Scale.java (1 of 2)

 2005 Pearson Education, Inc. All rights reserved. 8 Outline LoadImageAnd Scale.java (2 of 2)

 2005 Pearson Education, Inc. All rights reserved. 9 Portability Tip 21.1 Class Image is an abstract class—as a result, programs cannot instantiate class Image to create objects. To achieve platform independence, the Java implementation on each platform provides its own subclass of Image to store image information.

 2005 Pearson Education, Inc. All rights reserved Animating a Series of Images Animation can be created by displaying a sequence of similar images Timer object can be used to specify when each image is displayed Timer objects generate ActionEvent s at fixed intervals – Method start – Timer should start generating events – Method stop – Timer should stop generating events – Method restart – Timer should start generating events again Component method getPreferredSize determines the preferred width and height of a component Component method getMinimumSize determines the minimum width and height of a component

 2005 Pearson Education, Inc. All rights reserved. 11 Outline LogoAnimator JPanel.java (1 of 4)

 2005 Pearson Education, Inc. All rights reserved. 12 Outline LogoAnimator JPanel.java (2 of 4)

 2005 Pearson Education, Inc. All rights reserved. 13 Outline LogoAnimator JPanel.java (3 of 4)

 2005 Pearson Education, Inc. All rights reserved. 14 Outline LogoAnimator JPanel.java (4 of 4)

 2005 Pearson Education, Inc. All rights reserved. 15 Outline LogoAnimator.java (1 of 2)

 2005 Pearson Education, Inc. All rights reserved. 16 Outline LogoAnimator.java (2 of 2)

 2005 Pearson Education, Inc. All rights reserved. 17 Software Engineering Observation 21.1 When creating an animation for use in an applet, provide a mechanism for disabling the animation when the user browses a new Web page different from the one on which the animation applet resides.

 2005 Pearson Education, Inc. All rights reserved. 18 Look-and-Feel Observation 21.1 The default size of a JPanel object is 10 pixels wide and 10 pixels tall.

 2005 Pearson Education, Inc. All rights reserved. 19 Look-and-Feel Observation 21.2 When subclassing JPanel (or any other JComponent ), override method getPreferredSize if the new component is to have a specific preferred width and height.

 2005 Pearson Education, Inc. All rights reserved. 20 Look-and-Feel Observation 21.3 If a new GUI component has a minimum width and height (i.e., smaller dimensions would render the component ineffective on the display), override method getMinimumSize to return the minimum width and height as an instance of class Dimension.

 2005 Pearson Education, Inc. All rights reserved. 21 Look-and-Feel Observation 21.4 For many GUI components, method getMinimumSize is implemented to return the result of a call to the component’s getPreferredSize method.

 2005 Pearson Education, Inc. All rights reserved Image Maps Image maps used to create interactive Web pages Contains hot areas user can click to accomplish a task When user positions mouse pointer over hot area, normally a descriptive message is displayed Applet method showStatus displays text in an applet container’s status bar

 2005 Pearson Education, Inc. All rights reserved. 23 Outline ImageMap.java (1 of 5)

 2005 Pearson Education, Inc. All rights reserved. 24 Outline ImageMap.java (2 of 5)

 2005 Pearson Education, Inc. All rights reserved. 25 Outline ImageMap.java (3 of 5)

 2005 Pearson Education, Inc. All rights reserved. 26 Outline ImageMap.java (4 of 5)

 2005 Pearson Education, Inc. All rights reserved. 27 Outline ImageMap.java (5 of 5)

 2005 Pearson Education, Inc. All rights reserved Loading and Playing Audio Clips Java programs can play and manipulate audio clips Playing sounds in an applet – Applet ’s play method – loads sound and plays once – AudioClip ’s play, loop and stop methods – Additional capabilities provided by JMF and Java Sound APIs Loading sounds in an applet – Applet method getAudioClip – retrieves sound, returns reference to an AudioClip – Applet ’s play method loads sound Supported file formats include Sun Audio file format, Windows Wave file format, MIDI file format

 2005 Pearson Education, Inc. All rights reserved. 29 Outline LoadAudioAndPlay.java (1 of 4)

 2005 Pearson Education, Inc. All rights reserved. 30 Outline LoadAudioAndPlay.java (2 of 4)

 2005 Pearson Education, Inc. All rights reserved. 31 Outline LoadAudioAndPlay.java (3 of 4) Load audio clips

 2005 Pearson Education, Inc. All rights reserved. 32 Outline LoadAudioAndPlay.java (4 of 4)

 2005 Pearson Education, Inc. All rights reserved. 33 Look-and-Feel Observation 21.5 When playing audio clips in an applet or application, provide a mechanism for the user to disable the audio.

 2005 Pearson Education, Inc. All rights reserved Playing Video and Other Media with Java Media Framework A simple video can concisely and effectively convey a great deal of information JMF API enables Java programmers to play, edit, stream and capture popular media types Supported file types include Microsoft Audio/Video Interleave, Macromedia Flash2 movies, MPEG-1 videos and QuickTime movies

 2005 Pearson Education, Inc. All rights reserved. 35 Creating a Simple Media Player Interface Player used to play video Class Manager declares utility methods for accessing system resources to play and manipulate media Manager method createRealizedPlayer obtains a Player for a specified media clip Loading and playing video – Player method getVisualComponent gets component that displays visual aspect of media file – Player method getControlPanelComponent gets component that provides playback and media controls – Player method start begins playing media file

 2005 Pearson Education, Inc. All rights reserved. 36 Outline MediaPanel.java (1 of 2)

 2005 Pearson Education, Inc. All rights reserved. 37 Outline MediaPanel.java (2 of 2) Play clip

 2005 Pearson Education, Inc. All rights reserved. 38 Outline MediaTest.java (1 of 3)

 2005 Pearson Education, Inc. All rights reserved. 39 Outline MediaTest.java (2 of 3)

 2005 Pearson Education, Inc. All rights reserved. 40 Outline MediaTest.java (3 of 3)