Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
As an example of controlling a plug-in with JavaScript, you will now create a script to play sounds. I've created some graphics that vaguely resemble a piano keyboard and audio files for each note. Your script can detect mouse clicks on the keys and play the appropriate notes.
Note
You can download the audio files and graphics used in this example from this book's Web site at http://www.jsworkshop.com/.