[Previous] [Main] [Next]

Adding Music and Sounds

This is a step-by-step tutorial for adding music and sounds to your Movie. This tutorial illustrates some of the features seen in the "first.swi" file in the Samples Menu.

With SWiSH you can import both .wav and .mp3 formats. You can control the overall volume of sounds and apply simple fade Effects. A sound can be played when a Movie reaches a selected Frame or in response to a Mouse Event. For a more detailed explanation on using sounds in your Movie please read Play Sound. This tutorial will be limited to adding sounds to the Timeline in response to a Frame Event; adding sounds in response to Mouse Events will be discussed in the Creating Buttons tutorial.

As sound files can significantly increase the overall file size of the Movie, it is best to select short tunes that can be looped as background music, for a Movie that will be playing over the Web.

Note: If you are having problems importing .wav files, try downloading and installing the latest Windows Media Player from http://www.microsoft.com/windows/mediaplayer/en/default.asp


Adding Background Music

1. Open "myfirst.swi". Right-click on Frame 1 of the Scene row. From the context Menu select Play Sound. A sound_marker.png Play Sound Action marker will appear at that Frame on the Timeline

2. From the Actions Panel you should see the Play Sound Event highlighted in the 'Add Action' window. Press the 'Import' button to view the 'Import Sound' dialog box. From the Samples folder, select "88A.mp3" and press Open

3. Press the playmovie.png Play Movie button on the 'Control' Toolbar. The tune will play once and then stop. Press the stopmovie.png Stop button

4.
From the Actions Panel, to the right of the 'Import' Button, press the 'Options' button to access the 'Play Options' dialog box. The box at the top of the dialog box, displays the file's sample rate, and the length of 1x loop in seconds and Frames. In the 'Loop sound' edit box, enter 15 (this will ensure that the music will continue throughout the introduction). You can leave the Volume setting at 100%, and the 'Do not play if already playing' feature checked. Press OK to accept the changes

Note : The Sound Effects options work over the total number of loops, so you will not notice them if you have set a high number in the 'Loop sound' edit box

5. Press the playmovie.png 'Play Movie' button on the Toolbar. The tune will start as your Movie starts and will continue to play long after your animation has stopped


Sound Effects

You can add a Sound Effect to synchronize with the appearance of the logo.

1. Right-click on Frame 110 of the Scene row. From the context Menu select Play Sound

2. From the Actions Panel press the 'Import' button and from the Samples folder, select "FX1001.wav" and press Open

3. Press the 'Options' button to access the 'Play Options' dialog box. By default, the Compression for .wav files is set to MP3; leave this setting, as this will produce the smallest file size, compressing your .wav files up to 1/10 of their original size. As you do not want this sound to loop, leave the 'Loop sound' edit box value set to 1. Leave the Volume value set to 100%. Select Sound effect | Pan left to right. Leave the Preload sound set to Object or Scene default. Press OK

4. Press the playmovie.png 'Play Movie' button
on the Toolbar. The sound will begin playing when your logo appears, it will begin playing in the left speaker and end playing in the right speaker. Press the stopmovie.png 'Stop' button


Stopping Sounds

1.   Right-click on Frame 111 and select Stop Sound from the context Menu. Select "88A.mp3" and press Enter on your keyboard

Note:
·If you need or want to stop your background music in the middle of a loop, rather than having it stop abruptly, it may be helpful to the flow of the Movie if you stop the music while another sound is playing, as you have done in this example  
·There may be times when you will want to stop all sounds playing. This can be done within the Timeline by right-clicking on the Frame where you would like the sounds to stop and selecting Stop All Sounds from the context Menu  

2. Press the playmovie.png 'Play Movie' button on the Toolbar. Your background music will end just as "FX1001.wav" begins. Press the stopmovie.png 'Stop' button


3.    Your introduction is complete. You may view it in your browser by pressing the testbrowser.png 'Test in Browser' button

4.    Save your Movie

You are ready to continue with the Creating Buttons tutorial.




[Previous] [Main] [Next]