Go to File | Import. The Import dialog box will appear. Browse for and select the sound file you unzipped and press the Open button. The sound file has been imported into your Flash movie.
Press Ctrl + L or go to Window | Library. The Flash Library will appear. You will notice the sound file you just imported contained in the Library. Right click on the sound file's name 'world' and select Linkage.
In the Symbol Linkage Properties dialog box, select the "Export this symbol" option. Once you select the Export this symbol option, the Identifier field will be enabled. You should enter a name that will uniquely identify this sound file. Let's simply identify the sound file as "coolsound".
Once you entered coolsound for the Identifier value, press OK to close the Symbol Linkage Properties dialog box.
Let's go back to the main timeline. Draw a button. To create a button, simply draw a circle. Select the circle, press F8 or go to Insert | Convert to Symbol, and select the option for Button and press OK. You should know how to create a button by now...because you are a Masta Flash Programma!
Once you have created the button, right click on the button and select Actions. Copy and paste the following section of code:
on (release) {
kirupaSound = new <b style="color:black;background-color:#a0ffff">Sound</b>(this);
kirupaSound.attachSound("coolsound");
kirupaSound.start(0, 99);
}
Save the FLA and preview the animation. Click the button you just created. If all went well, you should hear the music play.
|