AudioBox
Press a button to play a sound. Sounds will composite when overlapped. Important: when running within Navigator on a local computer, it may be necassary to wait one or two
minutes until the status bar indicates that the java applet is running before pressing the form buttons.
This applet is a slick example of using JavaScript to communicate with an applet. It's fast, easy to use, and still allows the user to control the experience.
Usage: Download the zip file containing the class file and an example page, along with two example audio clips. Unzip it into one directory, and follow the instructions on the example page.
Java Source: Not available.
HTML Source:
<applet code="AudioBox.class" name="AudioBox" width=5 height=5>
</applet>
<form>
<input type="button" value="Sonar" onClick="playAudioClip('sonar.au')">
<input type="button" value="Babam" onClick="playAudioClip('babam.au')">
</form>
JavaScript Source:
<script language="javascript1.1">
<!--
//This function tells the AudioBox applet to play a sound
function playAudioClip( sAudioURL )
{
if ( (navigator.javaEnabled != null) &&
(navigator.javaEnabled()) )
document.AudioBox.playSoundtrack( sAudioURL );
}
//-->
</script>
Author: 1Automata
New on the Java Boutique:
New Review:
Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling
API boasts simplicity, ease-of-integration, a well-rounded feature
set, and it's free!
New Applet:
Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA
sequences into three useful formats.
Elsewhere on internet.com:
WebDeveloper Java
Lots of Java information on webdeveloper.com
WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.
ScriptSearch Java
Hundreds of free Java code files to download.
jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.
|