intro/SoundExample

From ggc

Jump to: navigation, search

01 package intro;
02 
03 import fang.*;
04 import java.awt.*;
05 import java.awt.geom.*;
06 
07 /**
08  * All about my game.
09  @author My Name Here
10  */
11 public class SoundExample extends Game
12 {
13   private Sound sound=new Sound("DingLower.wav");
14 
15   /**sets up the game*/
16   public void setup()
17   {
18     playSoundImmediately();
19     sound.setVolume(.2);
20     sound.loop();
21   }
22 
23   /**handle input and game events*/
24   public void advance()
25   {}
26 }


Download/View intro/SoundExample.java





Views
Personal tools
Add to 
del.icio.usAdd to 
diggAdd to 
FacebookAdd to 
favoritesAdd to 
GoogleAdd to 
MySpaceAdd to 
PrintAdd to 
SlashdotAdd to 
StumbleUponAdd to 
Twitter