Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-09-2007, 11:58 AM
Member
 
Join Date: Jul 2007
Posts: 1
Bagesh is on a distinguished road
Playing sound in applet??????
Hi,

Demo program given below is supposed to play sound.
--------------------------
import java.net.*;
import java.applet.*;

public class Sound2 {
public static void main(String a[]) throws java.net.MalformedURLException, InterruptedException {
URL url = new URL("http://simplythebest.net/sounds/WAV/WAV_files/cartoon_WAV_files/aladdin_goodbye.wav");
AudioClip clip = Applet.newAudioClip(url);
clip.play();
Thread.sleep(10000);
}
}
-------------------------------------------------------------
Is it possible to play (online .wav file) sound in Applet using URL Like
(http://simplythebest.net/sounds/WAV/...in_goodbye.wav)

Although I have tried

URL ur=new URL("file:\\C:\\Demo\\abc.wav");
AudioClip clip =Applet.newAudioClip(ur);
It's working fine
but while using URL "http://simplythebest.net/sounds/WAV/WAV_files/cartoon_WAV_files/aladdin_goodbye.wav" i can't hear any sound.


Actually i want to play "http://" URL file directly in applet
Please help me.

Last edited by Bagesh : 07-09-2007 at 12:21 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-13-2007, 05:40 PM
Member
 
Join Date: Jul 2007
Posts: 44
simon is on a distinguished road
the applets only have access to the resources of the machine where they execute.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-13-2007, 05:46 PM
Member
 
Join Date: Jul 2007
Posts: 3
satya123 is on a distinguished road
That's right..applet only accesses within the system or host...cross domain stuff isn't there here
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
add sound to my applet anotsu Java Applets 4 03-25-2008 12:26 AM
Re-playing sound JSK CLDC and MIDP 0 02-06-2008 12:34 PM
Nokia 5300 freezes when playing sound after receiving a call presto CLDC and MIDP 2 10-31-2007 04:55 PM
applet sound marco Java Applets 1 09-28-2007 11:31 PM


All times are GMT +3. The time now is 04:28 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org