![]() | Chapter 21: Figures, Sounds and Files | ![]() ![]() |
21.8. Declaring and playing back sounds |
Sound effects are accommodated on the same basis as illustrations. The relevant media files need to be placed in a subfolder of the project's Materials folder, but this time called Sounds rather than Figures, so for instance:
Example.inform
Example Materials
Figures
Woodlands.png
Blackberry.jpg
Red Admiral Butterfly.png
Sounds
Rustling leaves.ogg
Again, these must be declared in the source text:
Sound of rustling leaves is the file "Rustling leaves.ogg".
And they can be played using the phrase:
play the sound of rustling leaves;
As an option, we could also write
play the sound of rustling leaves, one time only;
which causes the sound effect to be played back the first time this phrase is reached.
Previous | Contents | Next |