Adding sounds to Flash isn't really hard. I'm gonna teach you 2 ways to do that, but in both, you have to have the song in the library. So go to FILE >> IMPORT >> select the song.
1-) Adding a song manually: to do that, select a frame, and go to its properties panel. There you will see an option where it says sound. Click there and select your song. And that's it =]. Now you can add effects and sync.
obs: I have had A LOT of problems when using this method, so i don't recommend it.
2-) Adding a song with AS: This method is a little harder. Firstly, right click it (on the library) and press linkage, and on the linkage window, chack export for action script,set the identifier to "sound"(w/o the quotes) and press OK.
Now, on the frame you want the sound to be, add this action:
song = new Sound();
song.attachSound("sound");
song.start(0, 1);
Explanation: on line 1 we set a new sound called "song" ( each new sound you add should have a different name, keep that in mind)
On line 2, we are attaching the song "sound" to "song"
and on line 3 we tell flash to start playing the song. On parenthesis, the number before the coma is the time it will be offset ( If you want the song to start playing on its 3rd second, this number should be 3), and the number after the coma is how many times the song will be played.
TIP: Generally, the function for stopping sounds is:
stopAllSounds ();
PS: Each new song MUST have a new identifier.
Oh, 1 more thing. The best place to get songs is at the NG audio portal
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment