Playing sounds

- The player piano

The player piano applet plays sound clips

Example 6 PushButton Music (Lalani, Jamsa: Java Programmers Library)

Sound clips must be stored in a file in .au format.

The basic structure of a playing application is to

See the playing sound - page in the Tutorial

Doing animations

The animation page in Java Tutorial

The two basic techniques for simple animation are :

Drawing graphic animations

The graphics animation page in the tutorial

The page presents the basic animation loop technique and shows how to avoid flickering in the image.

Moving image

The animation can be created moving an image on the screen.

This is demionstrated on the Moving image page

Repeating series of images

The Duke - animation is a well known icon of Java. Here you learn how to produce animations like that.

The animation page of the Tutorial

For advanceds animation Sun has created an "Animator" which can be used as an applet using the parameters of the animator-applet. You can move the image, attach sound to it change the timing et c.