Hi there…
I am doing a small presentation where a song (*.mp3) is gonna be played. I never worked with music in flash before, therefore, I already apologize if I am doing something wrong or stupid.
The music that is playing in the background is sounding horrible, lost its quality when I placed it in one of the frames. I am importing it by FILE>IMPORT>IMPORT TO LIBRARY
Is the process that I am using the one that is causing the lost of quality? And another thing, how can I know, by sure, how many frames I need in order to put the entire music?
Thanks again.
Cheers.
Leo.
similar post:
after you have imported your music, check the properties of the sound in your library, specifically the export settings. is it using the imported MP3 quality or is it compressing it to some other specification? also check your publish settings, specifically on the Flash tab. there are audio export setting towards the bottom for audio events and audio streams. chances are Flash is just recompressing the music when it exports it.
The way I know how many frames to equal the length of the .mp3 is just keep adding frames (not keyframes) until I see that the wave is over.
Here’s a formula for you though:
seconds of song X frame rate - starting frame = number of frames needed for entire song
Tip: You’re never going to get the music to stop (when you attach a song to keyframe) until it ends unless you tell it to. Here’s one way to control the stop and play:
-
Create a new laying and name it something like “Music”
-
Create a new move clip and name it something like “Music Player”
-
Now we’ll work on the stop and play buttons. You can use an image or text. If you are using images as your stop and play button then
a.) Import the image you will use as your stop button and another image for the play button to stage. Convert both images to buttons and name the buttons accordingly (stop & play). Now delete them both from the stage as they are now in the library as button symbols.
b.) Use the text tool and type “Stop” then convert it to a button symbol naming it “stop”. Now delete it from the stage and do the same thing for your play button. -
Create 2 more layers (3 in total). From top to bottom name them Actions, Audio, Buttons.
-
Select frame 1 on the Buttons layer then drag your stop button to the stage and give it an instance name of “btn_stop”
-
Select frame 2 of each layer and insert keyframe
-
Select frame 2 of the Buttons layer then drag your play button to the stage. Give the play button an instance name of “btn_play”
-
If you’r song is not imported then import it now. Set the song to frame 1 of the audo layer
-
In frame 1 of the Actions layer type in the following code:
stop();
btn_stop.onRelease = function() {
stopAllSounds();
gotoAndStop(2);
}
In the second frame of the Actions layer type in the following code:
stop();
btn_play.onRelease=function(){
gotoAndPlay(1);
}
-
Back out to the main stage. Select the Music layer and place a keyframe where you want your music to start (usually frame 1 unless you have an animated intro)
-
Drag and drop the “Music Player” movie clip to the stage
-
Test your movie