Flash tutorials
Home 3D (2) Actionscripting (66) Animation (108) Audio (4) Drawing (7) Full flash sites (4) Getting Started (15) Navigation (25) Special Effects (61) Text Effects (38)

Sound in flash with Action Script

11.8.2006, 9:16    Total views: 59092
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 1

Create 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 2

Open the Library (Ctrl+L), right click on the "sound" that you have Imported (notify) and choose Linkage. Look at the picture below!

Step 3

In the Linkage Properties window select the Export for Action Script, and under Identifier: type SoundOn and click ok. Look at the picture below!

Step 4

Select the button (Ctrl+A), open the Action Script Panel (F9) and paste this script:

on (press) {
mysound = new Sound();

Test your movie (Ctrl+Enter)

We're done!

Download source file (.fla)
Have questions about this tutorial?
Visit our friendly Community Forums!
Digg it! Add this tutorial to del.icio.us! Furl it! Add this tutorial to reddit! Spurl it! Add this tutorial to technorati!

Top tutorials

1. Advanced full flash site - Part 1
Total views: 310287

2. High-tech city animation
Total views: 272904

3. Water effect
Total views: 237059

4. Photo slide show
Total views: 220388

5. Special Picture Effect
Total views: 190723

Related links