Hi at all
first I do not know java.
I simply ask an applet like rhis:
http://www.roseindia.net/java/exampl...undApplet.html
Applet must be sure and standalone with e paramreter to can pass to applet the name of wav or mp3
Thamk you
Printable View
Hi at all
first I do not know java.
I simply ask an applet like rhis:
http://www.roseindia.net/java/exampl...undApplet.html
Applet must be sure and standalone with e paramreter to can pass to applet the name of wav or mp3
Thamk you
This is code:
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class PlaySoundApplet extends Applet implements ActionListener{
Button play,stop;
AudioClip audioClip;
public void init(){
play = new Button(" Play in Loop ");
add(play);
play.addActionListener(this);
stop = new Button(" Stop ");
add(stop);
stop.addActionListener(this);
audioClip = getAudioClip(getCodeBase(), "TestSnd.wav");
}
public void actionPerformed(ActionEvent ae){
Button source = (Button)ae.getSource();
if (source.getLabel() == " Play in Loop "){
audioClip.play();
}
else if(source.getLabel() == " Stop "){
audioClip.stop();
}
}
}
It work well but I am unable to build it as an aoolket accepting as parameter the name of audio file