Article View: borland.public.jbuilder.java.language
Article #7931Re: using .wav files
From: paul nichols
Date: Wed, 02 May 2001 10:34
Date: Wed, 02 May 2001 10:34
27 lines
1575 bytes
1575 bytes
Not really,
Here is a snippet for you
package <somepackagename>
import javax.media.bean.playerbean.MediaPlayer;
import javax.media.*;
import javax.swing.JOptionPane;
import java.net.URL;
public class MyMediaPlayer() {
startThePlayer() {
MediaPlayer player=new MediaPlayer();
try {
MediaLocator ml=new MediaLocator(new
URL("file://windows\media\tada.wav"));
player.setMediaLocator(ml);
player.setPlaybackLoop(false);
player.start();
}
catch(Exception ex) {
JOptionPane.showMessageDialog(null,"Error !! "+ex.getMessage());
}
}
}
Technical Details
Message-ID:
<3aefe2ea$1_2@dnews>Path:
arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.stealth.net!news.uni-stuttgart.de!nntp.CS.Uni-Magdeburg.De!news.boerde.de!dnewsReferences:
<3aed5f8e_1@dnews> <3aee585d$1_2@dnews> <3aeece3b_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,d893aad0b59add1b X-Google-Attributes: gidf74b3,public X-Google-Thread: f7754,d893aad0b59add1b X-Google-Attributes: gidf7754,public X-Google-ArrivalTime: 2001-05-02 03:44:06 PST From: "paul nichols" <paul@computer-logic.net> Newsgroups: borland.public.jbuilder.java.language,borland.public.jbuilder.students References: <3aed5f8e_1@dnews> <3aee585d$1_2@dnews> <3aeece3b_1@dnews> Subject: Re: using .wav files Date: Wed, 2 May 2001 06:34:57 -0400 Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 24.159.98.249 Message-ID: <3aefe2ea$1_2@dnews> X-Trace: dnews 988799722 24.159.98.249 (2 May 2001 03:35:22 -0700) Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.stealth.net!news.uni-stuttgart.de!nntp.CS.Uni-Magdeburg.De!news.boerde.de!dnews