If we compare this tutorial with previous tutorial, this tutorial will show you how to create a sound in flash using Action Script. That's the difference - using Action Script.
Step 1Create a new flash document, Import the sound and create a button in an equivalent way like we have done in previous tutorial (see step 1-6 in the previous tutorial).


Step 2Open the Library (Ctrl+L), right click on the "sound" that you have Imported (notify) and choose Linkage. Look at the picture below!
Step 3In the Linkage Properties window select the Export for Action Script, and under Identifier: type SoundOn and click ok. Look at the picture below!
Step 4Select the button (Ctrl+A), open the Action Script Panel (F9) and paste this script:
on (press) {
mysound = new Sound();
mysound.attachSound("SoundOn");
mysound.start();
}
Test your movie (Ctrl+Enter)
We're done!
Download source file (.fla)