Royalty Free Music > Info / Help > Tutorials > Importing audio files into Flash™
So you are ready to import audio into your Flash project. This process is quite simple and should go fairly quickly. The first step of this process is to prepare the audio file you will be importing. Flash is most compatible with uncompressed audio formats such as WAV and AIFF files, and automatically compresses the audio to MP3 when you publish your movie. If Flash returns an error when you attempt to import an MP3 file, convert it to either WAV or AIFF in a 3rd-party audio conversion application and try again. For this tutorial, I will be importing an MP3 file. If your audio requires substantial editing, you should do so in a 3rd-party application because of Flash's limited editing options.
Once your audio file is ready, the next step file will be to make a new layer and name it audio. This naming system is of course only a suggestion, but having clear names will help you locate yourself within your project as it expands with more layers. Make sure there is a blank Keyframe where you want the audio to start, and at least a few blank frames after that Keyframe if not more (doing this will allow you to see the audio file once it is on the layer).
(creating the audio layer)
In the next step we will locate the file we wish to import. Go to 'File>Import>Import to Library' and browse to your audio file. Selecting it once it is located will import the file into the library and a new audio icon will appear with your other files. I am importing a file named "14 Now Mary.mp3." If you do not see your library just go to Window in the menu options at the top of the screen and select Library, it should appear. You can see the waveforms (the two spiky lines which indicate the levels of the left and right audio channels) with play and stop buttons appear in the library preview window when the new audio file is selected in the library.
(new audio file in library)
Once the audio file has been imported into the library, select the audio layer in your timeline, and drag your file from the library directly onto the work area of your main stage. You should see a thin waveform appear in those few frames in the audio layer of your timeline. Now select the end frame and drag it further down the timeline, this should reveal the rest of the waveform in the audio layer.
(audio waveforms in the timeline)
These waveform spikes will assist you in timing to your audio to your animation. If you want to move the beginning of the audio around in the layer, you can select the first frame, and drag it to the frame where you would like the audio to begin. Then just grab the last frame and drag it to where you want your audio to end. One thing to know is that the audio file on the layer cannot have a Keyframe between the beginning and the end of the waveform. If you insert one it will stop the audio at that point and clear any audio after it. You can still move the frame at the end of the audio to reveal the waveform again however. Also it would likely make it easier if you reserve this layer only for the audio you have applied to it.
If you are importing a longer audio file that requires a fade out you will have to do that. If you do not cut the audio down, your .swf file will get to the end of the animation and repeat while the previous audio continues to play. This will result in multiple layers of audio playing at once, and will distort the audio. To fade the audio out simply select it in the "audio" layer, and you will notice the right hand side of your properties inspector will display the audio file name.
Select edit from your properties inspector. This will open the edit envelope window, which displays the left and right channel waveforms up close. The first thing to do is check and bottom of the window and make sure frames is selected instead of time. Doing this will change to numbers between the waves to correspond to the frame on which the audio is happening instead of at what time it happens.
(select the film for "frames" instead of the clock for "time")
Since I know that I want my audio to fade out around frame 165 this makes it easier for me to time the fade out with the end of my animation. The dark line across the top of the waveform represents the audio level. If you click on it, you will create a control point. I created two control points, then left one at the top around frame 158, and dragged the other to the bottom around frame 171.
(fading the audio out)
This will cause the audio to fade out when it gets to these frames. My audio is now where I want it to be. You can also use this technique to edit the level of the left and right channels throughout your project if you wanted certain parts to be louder or softer. Congratulations, you have now given your Flash project the power of audio!
This tutorial is © Award Winning Music