home *** CD-ROM | disk | FTP | other *** search
- import java.applet.AudioClip;
-
- class coosound extends Thread {
- AudioClip m_source;
- String m_mode = "none";
-
- coosound(AudioClip source, String mode) {
- this.m_source = source;
- this.m_mode = mode;
- }
-
- public void start() {
- if (this.m_source != null) {
- try {
- if (this.m_mode.equals("play")) {
- this.m_source.play();
- return;
- }
-
- if (this.m_mode.equals("loop")) {
- this.m_source.loop();
- return;
- }
- } catch (Exception var1) {
- ((Thread)this).stop();
- return;
- }
- }
-
- }
- }
-