Exercises
If you want to gain more experience working with sounds in JavaScript, try the following exercises:
Expand the piano keyboard in Listing 20.2 to include more notes. (Additional sound files are available from this book's website.) You should only need to change the HTML file. Try adding one or more sounds to the animated slideshow in the previous hour (refer to Listing 19.8). You can adapt the PlaySound() function from this hour to play a specific sound as the slideshow advances.
|