Adding Music and Sounds
|
Top Previous Next |
1. | Open "myfirst.swi" saved from the previous tutorial. Right-click on Frame 1 of the Scene row. From the context Menu select Sound | Play Sound. A ![]() |
2. | From the Actions Panel you should see the Play Sound Event highlighted in the 'Add Script' window. Note that the Action playSound is in red. This is because the statement is currently incomplete (it does not contain a sound to play). Press the 'Import' button to view the 'Import Sound' dialog box. From the Samples folder, select "88A.mp3" and press Open
|
3. | Left-click on the sound "88A.mp3" to select that as the sound to be played. The selected sound is now shown as the parameter to the playSound() Action. Note that the script marker changes to ![]() |
|
![]() |
4. | Select the 'Layout' Panel and Press the ![]() ![]() |
5. | From the Script Panel, below the 'Import' Button, press the ![]() |
![]() |
![]() |
7. | 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 select the option 'Don't play sound if it is already playing' feature checked. Press OK to accept the changes. This will change the parameters of the playSound() Action to: "playSound("88A.mp3",True,100,15);"
|
8. | Select the 'Layout' Panel and Press the ![]() |
1. | Right-click on Frame 110 of the Scene row. From the context Menu select Sound | Play Sound. From the Script Panel press the 'Import' button and from the Samples folder, select "FX1001.wav" and press Open
|
3. | Click on the ![]() |
|
4. Select the 'Layout' Panel and Press the ![]() ![]() |
|
|
Stopping Sounds
|
|
1. | Right-click on Frame 111 and select Sound | 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
|