Flashadvisor logo
:: Desktop Shortcut
:: Flash Help
Advices from Experts

 Submit Here! · Link to Us · Newsletter · Tell a Friend ·

      Add Tutorial |

 

Advertise here








 

Google

Search WWW   
FlashAdvisor.com

 Home > Tutorials  > Advanced

Controlling sound using Actionscript

Author: Saumitra Karandikar | Email


Advertisement


Audio integration into a Flash file always adds "glamour" to the Flash file. It makes it highly presentable and enhances the user experience.

We will see how to do the following using Flash:
1. Import audio into flash
2. Adding audio to frames
3. Adding audio to buttons
4. Looping audio
5. Updating/Editing the added audio
6. Sharing the audio file across multiple files/projects


Going Step by step:

1. Import audio into Flash:

Flash supports the following audio formats:
- Popular audio compression format (.mp3)
- Windows audio (.wav)
- AIFF Sound (.aiff)
- Sun Au (.au)

This gives a lot of flexibility to use different devices to record voice and finally import into on to the Stage or the Library.

Please note that Flash does not support sound file formats used for mobile devices (such as MIDI and others); when authoring for mobile devices, you must temporarily place a proxy sound in a supported format such as MP3, WAV, or AIFF in the Flash document. The proxy sound in the document is then linked to an external mobile device sound, such as a MIDI file. During the document publishing process, the proxy sound is replaced with the linked external sound. The SWF file generated contains the external sound and uses it for playback on a mobile device.

Lets begin by importing the sound "music.mp3". To do this, use "File > Import > Import to Library" option from the "File" menu. You may as well choose "Import to Stage", but it has the same effect of loading the file into the Library.
Once loaded in the Flash Library, the audio file get embedded in the file. In case, the external audio file changes, the internal imported audio doesn't get automatically updated. We will see how to do this later in this tutorial.

We have successfully imported the audio file.
The screenshot Fig 1.1 shows how the library appears with the imported Sound. You can also listen to the library audio by using the "play' button at the top of the library.



Fig 1.1

Download Source File

| 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Rate This Tutorial :
We hope the information helped you. If you have any questions or comments, please don't hesitate to post them on the Forums section
Submit your Tutorial at Click Here
  

Home | About Us | Contact Us | Feedback | Advertise with us

Best viewed in 800x600 resolution with Internet Explorer.

Site Developed and Hosted by  ethicsolutions.com
All rights reserved with FlashAdvisor

Flash is a registered trademark of Adobe Systems, Inc.

1 user online