|
|
Search Tutorials
Adding and Controlling Music in a Flash Movie.
a. Launch Flash MX 2004 b. Create new Flash file. Click File> New… c. Select Flash Document in a new window d. Now you need to download some sound loop to put it into your new flash file. The best place to get the sound loops is: e. You should see the "Import to Library" browsing window. Then find mp3 file you have downloaded from flashkit.com and select it. Press "OK". To see the mp3 file you need to press "Ctrl+L". "Library Panel" with the imported mp3 file must appear on the right side of your flash work space. Library panel displays the objects, motion tweens, movies, shapes and images used in entire flash movie. f. Click on the icon of mp3 file and drag it to the white working area. You may see that the first frame in layer is not empty now. It contains the loop you imported. Rename the "Layer 1" to "Music" g. Press "Ctrl+Enter" to compile the movie. If you did everything right the inserted music should be playing now. h. You may read how to make buttons by clicking the link below: i. Press "F9" to open the Action panel. To copy and paste action script codes use the right window of the action panel. On the illustration bellow you may see that the appropriate window is marked with the red sign "Copy your Action Script Code Here!!!" j. Click on the "On" button to select it and copy and paste the following piece of code: k. Click on the "Off" button to select it and copy and paste the following piece of code: l. Now we need to add one more frame to all 4 layers. Then click the lower layer "Music" in the Time panel and paste the following code: m. Well, we are ready to test it;-) Press "Ctrl+Enter" to see the movie. Click on the "Off" button to turn the music off and "On" to switch it on from the beginning. n. This is basic techniques of manipulating sounds in flash. We plan to add more advanced tutorials later so stay in touch to get more tutorials from Metamorphosis Design:-) Click here to download source fla file. About the Author: Oleg Lazarenko You may reprint this tutorial for free as long as the content, About the Author sections and all links remain unchanged.
|
||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||
|