943,547 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 3550
  • Java RSS
Mar 2nd, 2004
0

Need help with looping some sounds

Expand Post »
I need to loop the one sound so that the timer will make it so the sound will play then delay 5 seconds and then play again.

My source code is:

--------------------------------------------------------------------------------------------------------
import java.awt.*;
import javax.swing.*;
import java.applet.AudioClip;
public class Morning extends JApplet
{
private AudioClip rooster;
private final int dealy = 5000;
private Timer t;
public Morning()
{
t = new Timer(delay, this);
}
public void init()
{
rooster = getAudioClip(getDocumentBase(),
"roost.wav");
rooster.play();
t.start();

Container c = getContentPane();
c.setBackground(Color.white);
}
}
--------------------------------------------------------------------------------------------------------
Can anybody please help me?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
cody_e is offline Offline
4 posts
since Mar 2004
Mar 4th, 2004
0

Re: Need help with looping some sounds

Is there like anybody here. I posted this like 2 days ago.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
cody_e is offline Offline
4 posts
since Mar 2004
Mar 4th, 2004
0

Re: Need help with looping some sounds

were all dumb and dont know ??? no just joking .. youll find someone once there online...
Reputation Points: 18
Solved Threads: 0
Junior Poster
RC_Razor is offline Offline
156 posts
since Feb 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: help!! My applet can't run... Urgent!!
Next Thread in Java Forum Timeline: Read and write to an ASCII Text file





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC