Package java.applet

Examples of java.applet.AudioClip


  }
    }

    public boolean playText(String url) {
  log("fetching: " + url);
  AudioClip sound = getAudioClip(getCodeBase(), url);
  if (sound != null) {
      sound.play();
      showStatus(url);
      return true;
  } else {
      return false;
  }
View Full Code Here


    public native void showStatus( String status );
    */
   
    public AudioClip getAudioClip(URL url) {
    ResourceProxy resourceProxy = ResourceProxy.load(url, null);
        AudioClip audioClip = resourceProxy.getAudioClip();

    return audioClip;
    }
View Full Code Here

    return imageProducer;
    }

    public synchronized AudioClip getAudioClip() {
    AudioClip audioClip = resource.getAudioClip();

    audioClip = new AudioProxy(audioClip);

    if(audioClip instanceof Holder) {
      Holder holder = (Holder)audioClip;
View Full Code Here

    return imageProducer;
    }

    public synchronized AudioClip getAudioClip() {
    AudioClip audioClip = null;

    if(object != null)
      audioClip = (AudioClip)object;
    else {
            // we use a PrivilegedAction here because otherwise the system classloader
View Full Code Here

        return sprites.size();
    }

    public void playSound(int codigo)
    {
        AudioClip audioClip = (AudioClip)lista_sonidos.elementAt(codigo);
        audioClip.play();
    }
View Full Code Here

    return resLoader.getClass().getResource("../" + filePath);
  }
 
 
  public static AudioClip getAudioClip(String filePath) { // throws Exception
    AudioClip sound = Applet.newAudioClip(ResourceLoader.getURL("audio/" + filePath));
    return sound;
  }
View Full Code Here

      setFrameNum(0);
        }
        repaint();

        if (sounds != null) {
      AudioClip clip =
          (AudioClip)sounds.get(frameNumKey);
      if (clip != null) {
          clip.play();
      }
        }

        try {
      Integer pause = null;
View Full Code Here

            public void actionPerformed(ActionEvent e) {
                JTextField jtx = (JTextField) map.get("JTextField");
                if (jtx instanceof JTextField) {
                    try {
                        File f = new File(sfxDir + File.separator + jtx.getText());
                        AudioClip au = Applet.newAudioClip(f.toURL());
                        au.play();
                    } catch (MalformedURLException ex) {
                        if (JXAenvUtils._debug) {
                            ex.printStackTrace();
                        }
                        new UIMessage(true, ex, null, UIMessage.ERROR_TYPE);
View Full Code Here

    return imageProducer;
    }

    public synchronized AudioClip getAudioClip() {
    AudioClip audioClip = resource.getAudioClip();

    audioClip = new AudioProxy(audioClip);

    if(audioClip instanceof Holder) {
      Holder holder = (Holder)audioClip;
View Full Code Here

    return imageProducer;
    }

    public synchronized AudioClip getAudioClip() {
    AudioClip audioClip = null;

    if(object != null)
      audioClip = (AudioClip)object;
    else {
            // we use a PrivilegedAction here because otherwise the system classloader
View Full Code Here

TOP

Related Classes of java.applet.AudioClip

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.