Putting the sound on the stage
Ahh, that's better. Good coffee.
To get sound to play correctly for this tutorial we need to add sound to a layer and set it up to stream. This means that the whole sound does not need to download before it starts to play.
Select the media layer. At the bottom of your Flash MX application you will see your Properties window. Drop down the Sound combo and you should see the sound file you have imported. Select your sound and make sure that the Sync combo is set to Stream. This means that your sound will be downloaded and played frame by frame. Don't worry. The sound comes out sounding nice and smooth, it's just that you don't have to wait for the whole sound to download before you can start listening to it. You also have the added bonus of being able to jump to any frame (or position) in the sound by using a gotoAndPlay command.
Right now, though, your media layer will probably have only one frame. This is bad when we are trying to stream the sound. We need enough frames to play all of it. Right-click on the media layer timeline somewhere to the right of frame 1. Select Insert Frame. You should see your sound wave drawn in the frames that you have created. Keep inserting frames until you can see all of your sound.
Delete any extra frames that have no sound in them so that we don't end up with silent frames at the end of the sound.
Now if you click and drag the playhead (pinky-red rectangle in the timeline) you should hear the sound you imported. It will sound jerky here.
Test your movie (Ctrl+Enter) to hear your sound correctly.
|» Level Advanced|
Rating: 8 Votes: 63
|Tim is a co-director of the Glasson Murray Group, providing quality graphic design, illustration, 3D visualisation, interactive environments, virtual reality, multimedia and website services.|
|Download the files used in this tutorial.|
|Download (2157 kb)|
|More help? Search our boards for quick answers!|