Category Archives: Audio Tutorials

Flash Audio: Import/Add Sound To A Movie

The first thing you have to do of course is to start Flash. In this tutorial I use Flash 8 Professional, but the tutorial here can be applied to Flash MX 2004 or Flash MX. Go to File -> Import -> Import to Library….

How to add audio to Flash project

A dialog box appears asking you to choose a file from your hard drive.

Add audio to your flash project

Because you need only sound formats and the rest can be ignored, the next thing you have to do is to filter the sound files using the “Files of Type” drop down menu and selecting “All Sound Formats”.

Add music and sound effects to your multimedia flash project

add wav file to flash audio project

Select an MP3 (or other sound format) on and click “Open”.

The track appears now in the Library of the Flash Movie. You can open the library through Window -> Library. Open the library to see the imported MP3 file.

add mp3 audio file to flash

As you can see, you can preview the file in the library and perform some optimization in the settings. But that’s not the focus of this tutorial, we just want to add some sound to our movie. Go to the timeline of the movie and add an additional layer (Insert -> Timeline -> Layer).

sound layer, content layer in flash audio tutorial

Now you have 2 layers on your timeline. Rename the upper layer “Sound”, the layer below rename to “Content”. That’s it. Your timeline should now look like on image 7.

timeeline for audio in flash tutorial

Select the first frame on the layer “Sound” and open the first properties panel (Window -> Properties). In the panel, find the “Sound” drop down panel and select the imported sound file.

sound drop menu in flash tutorial

You can now test the movie clicking on Control -> Test Movie or pressing Ctrl + Enter.

Embedding Audio Files

How do I put background music on my web page?

It’s fairly simple to add background music to your web page but first you have to consider your visitors. Never put a sound that plays automatically in the background with no option for the user to turn it off. In fact, it would probably be best to give your visitors the choice of turning on the music only if they want to hear it.

 The <EMBED> tag is the most common way of adding sound to a Web page. Its advantage over the <BGSOUND> tag is that it is supported by both browsers, and more consistently across the PC and Mac platforms. The <EMBED> tag introduces many features that aren’t supported by <BGSOUND>. Furthermore, while the <BGSOUND> tag only supports background sounds, the <EMBED> tag also features an interactive interface (including various buttons to play, stop, and handle the sound). Let’s take a look at the <EMBED> tag in action
(requires a sound-enabled browser)

The HTML code that generates a control panel is very simple:

This code:
<EMBED height="20" SRC="http://www.partnersinrhyme.com/indexmidis/BLUES.MID" VOLUME="50" loop="true" controls="console" AUTOSTART="FALSE" width="128">

Will produce this console:

This version uses a WAV file instead of a midi:
<EMBED height="20" SRC="http://www.sound-effect.com/sounds/loops2/SweetDreams.WAV" VOLUME="50" loop="true" controls="console" AUTOSTART="FALSE" width="128">

If you find a sound you like somewhere on the web and decide you want to use it on your web page make sure you download the file to your hard drive then upload it to your own server. Do not under any circumstances link directly to the server you found the file on. Hot linking to someone else’s server is considered bandwidth theft and is against the law.

The attribute, "autostart=true," specifies whether the file should start playing automatically after it loads. If autostart is set to "false," then the file will load into the sound player utility but the user will have to click on the "play" button of the sound player utility in order to start the playing of the sound file.

The LOOP attribute tells the browser how many times you want the the sound to repeat. If you added LOOP="10" to the <BGSOUND> tag, the sound would play 10 times and then stop LOOP="TRUE" will play the loop until the user stops it.

If you need more music loops you can always download free royalty-free music loops here.

 

If you find a sound you like somewhere on the web and decide you want to use it on your web page make sure you download the file to your hard drive then upload it to your own server. Do not under any circumstances link directly to the server you found the file on. Hot linking to someone else’s server is considered bandwidth theft and is against the law.

The attribute, “autostart=true,” specifies whether the file should start playing automatically after it loads. If autostart is set to “false,” then the file will load into the sound player utility but the user will have to click on the “play” button of the sound player utility in order to start the playing of the sound file.

The LOOP attribute tells the browser how many times you want the the sound to repeat. If you added LOOP=”10″ to the tag, the sound would play 10 times and then stop LOOP=”TRUE” will play the loop until the user stops it.

If you need more music loops you can always download free royalty-free music loops here.