|
|
|
Controlling sound using Actionscript
Author: Saumitra Karandikar | Email
Advertisement
6. Sharing the audio file across multiple files/projects: You may want to do this since the existing audio file is to be played across multiple files. For example, a music loop that is to be played across the entire project. This can be achieved in several ways. The most common way is to create an swf file, which contains the audio in an infinite loop, and loading this swf file at a level from the project's main file. You may also then, control the audio's availability, by unloading the "audio_movie" where not required. The other method is by loading the audio each time the new movie is loaded so that it is loaded only when required.
Earlier, in the Flash 4 era and later even in the Flash 5 era, it was not possible to control sound effectively. But with Flash MX and MX 2004, the control of audio is much powerful using actionscript. Thus, the embedding of audio is not required anymore and can be easily controlled using the "sound" class.
Discussing the "Sound" class is beyond the scope of this tutorial.
Download Source File
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
|
|
|