Creating a Flash Piano

by Dr. Steven G. Estrella

Updated for Flash CS3 on March 28, 2008

I often create Flash media for music education and music educators have asked me if I would develop a short tutorial to demonstrate how to create interactive media for music education using Flash. This tutorial will show you how to create a basic one-octave interactive piano using Flash. The concepts and techniques you learn here can be extended to create more complex Flash media. Before you attempt this tutorial, make sure you have run through the first couple of chapters of the Flash CS3 Professional Visual Quickstart Guide.

Let's begin by taking a look at the final product embedded below. Begin by clicking the piano keys to hear the piano sounds. Then type the letters and numbers show below on your computer keyboard to play the sounds. Try playing a simple melody such as "I'm a little teapot" (q,w,e,r,t,i,y,i,t,r,r,t,e,e,w,w,e,q).

To create this little piano we will need sound files of the 13 pitches of the octave. You can create these using any audio editing program by recording a performance of the pitches on a piano or synthesizer. To help you get started, however, you may download a zip archive of the 13 pitches in mp3 format for you to use. After you unzip the archive you will have a folder called "pitches" containing the 13 files. The names of the files are based on the MIDI note number for the pitches middle C (number 60) through the octave above middle C (number 72).

Store the pitches in a new folder on your hard drive that you use just for this project. Call it "Piano."

You will also need the script file. Download it here (right click on the link and save the file to your hard drive) and store it in your "Piano" folder.

All of the instructions for the tutorial are given in the following screen movie. Click here to open it in a new window.

Conclusion

Feel free to add some text on the main timeline as I have done to enhance the appearance of this piece. Save your work. Test your movie again. Enjoy.

You can get MCSE and scjp exam within days using latest ccnp and other resources of Microsoft Certification; you can get a wonderful booklet for microsoft training.