edu.umd.cs.jazz.animation
Class ZAudioAnimation
java.lang.Object
|
+--edu.umd.cs.jazz.animation.ZAnimation
|
+--edu.umd.cs.jazz.animation.ZAudioAnimation
- public class ZAudioAnimation
- extends ZAnimation
ZAudioAnimation is designed to make it easy to synchronize an audio clip
with another animation. ZAudioAnimation does not really animate but it overrides
the animationStarted and animationStarted methods and starts
and stops it audio clip from within those methods.
To synchronize audio with an animation just create a new ZAudioAnimation with the audio
clip that is wanted, and schedule the audio animation with the same ZAlpha object that is
used for the other animation. This will cause the audio to start and end at the exact same
time as the animation it is being synchronized to.
- Author:
- Jesse Grosjean
- See Also:
ZAlpha
|
Constructor Summary |
ZAudioAnimation(java.applet.AudioClip aAudioClip)
Construct a new ZAudioAnimation. |
|
Method Summary |
protected void |
animationStarted()
Start looping the audio clip. |
protected void |
animationStopped()
Stop looping the audio clip. |
java.applet.AudioClip |
getAudioClip()
Return the audio clip that will be looped when the animation is started, and
stopped when the animation is stopped. |
void |
setAudioClip(java.applet.AudioClip aAudioClip)
Set the audio clip that will be looped when the animation is started, and
stopped when the animation is stopped. |
| Methods inherited from class edu.umd.cs.jazz.animation.ZAnimation |
animateFrameForTime, animationRateByElapsedFrames, animationRateByElapsedTime, animationRateByNextFrame, getAlpha, isStopped, play, scheduleNextFrame, scheduleNextFrame, setAlpha, stop |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZAudioAnimation
public ZAudioAnimation(java.applet.AudioClip aAudioClip)
- Construct a new ZAudioAnimation.
- Parameters:
aAudioClip - the audio clip that will be looped when the animation is started.
getAudioClip
public java.applet.AudioClip getAudioClip()
- Return the audio clip that will be looped when the animation is started, and
stopped when the animation is stopped.
setAudioClip
public void setAudioClip(java.applet.AudioClip aAudioClip)
- Set the audio clip that will be looped when the animation is started, and
stopped when the animation is stopped.
animationStarted
protected void animationStarted()
- Start looping the audio clip.
- Overrides:
animationStarted in class ZAnimation
animationStopped
protected void animationStopped()
- Stop looping the audio clip.
- Overrides:
animationStopped in class ZAnimation
Copyright © 2001 by University of Maryland, College Park, MD 20742, USA All rights reserved.