Đang chuẩn bị liên kết để tải về tài liệu:
Lecture Object Oriented Programing - Chapter 21: Multimedia: Applets and applications
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
In this chapter you will learn: How to get and display images; how to create animations from sequences of images; how to create image maps; how to get, play, loop and stop sounds, using an AudioClip; how to play video using interface player. | 21 Multimedia: Applets and Applications 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 OBJECTIVES In this chapter you will learn: How to get and display images. How to create animations from sequences of images. How to create image maps. How to get, play, loop and stop sounds, using an AudioClip. How to play video using interface Player. 21.1 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 21.1 Introduction Multimedia – the “sizzle” of Java Sound, images, graphics and video An enormous programming field | 21 Multimedia: Applets and Applications 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 OBJECTIVES In this chapter you will learn: How to get and display images. How to create animations from sequences of images. How to create image maps. How to get, play, loop and stop sounds, using an AudioClip. How to play video using interface Player. 21.1 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 21.1 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 21.2 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 ImageObservers receive notifications as Image is loaded and update image on screen if it was not complete when displayed Java supports several