DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2002
    Posts
    1

    Question sound in the applets?

    Is it possible to have sound running in the background of an applet?

  2. #2
    Join Date
    Dec 2002
    Posts
    5

    Actuly i don't know...

    Well Actully i don't no i think you can , You got me there...

  3. #3
    Join Date
    Sep 2002
    Posts
    124
    Hi, Javagirl

    Sound is definitely possible in Java. If you want sound running in hte background of an applet you'll need to look at "Thread" and "play".

    Threads are used when more than action is performed, eg sound and animation in an applet. Play simply does that. e.g.

    play(getCodeBase(), soundFile);

    From Java 1.2 onwards it has been possible to write code for .au sound files, .wav files, .aif files and .mid files.

    Try looking through the applets with source code for ideas... there are plenty in the Java Boutique and elsewhere. Here's one to get the ball rolling...

    http://javaboutique.internet.com/Cornholio/

    Regards,
    Joyous Monkey

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links