User Guide
186 CHAPTER 14
i
This approach allows developers to protect their script work, since AER fi les only open in the Player and can’t be
opened in Atmosphere.
The script below this top section is the part processed in the Atmosphere Player using the custom values for
properties that were set in the Inspector.
Working with Sound
The Sound.js script preset adds directional sound to an environment. The script includes several default properties.
The active property is a Boolean (true or false) value that determines if the sound is on or off. The ambient Boolean
value determines if the sound is associated with a position in space or if it can be heard equally anywhere within the
environment. The far and near values determine the distance from the sound at which the volume falls to zero and
is at its maximum respectively. The origin is the sound’s position in the environment (if the ambient value is set to
false).
i
Atmosphere supports positional sound, meaning that the sound will get louder as you navigate closer to it and softer
as you move away.
The play and stop properties can be controlled by other scripts to start and stop the sound. The repeats property
defi nes the number of times the sound will play. If the repeats value is set to 0, then sound will loop indefi nitely. The
runOnStartup value will cause the sound to begin when the environment loads. The URL property defi nes the path to
the sound fi le to play. Atmosphere supports sound in the WAV and MP3 fi le formats. The volume property controls
how loudly the sound plays.
Tutorial: Adding Background Sound
Sound can add much to the ambience of the environment. Car noises on a city street, forest sounds for a mountain
scene, classical music in a library and even elevator music for an elevator all add realism to the environment.
To add background sound to a scene, follow these steps.
1 Locate the Help\Tutorials\Gallery folder under the directory where Atmosphere was installed. It should be a path
similar to c:\Program Files\Adobe\Atmosphere\Help\Tutorials\Gallery. After navigating to your folder in the open
dialog, select the project fi le gallery.atmo and press Open.
2 Select the Add Script Preset menu command in the palette menu of the Object Presets palette. This will open a fi le
dialog box.
3 Locate the Extras\Scripts\Set_1_Basic folder under the directory where Atmosphere was installed. It should be a
path similar to c:\Program Files\Adobe\Atmosphere\Extras\Scripts\Set_1_Basic. After navigating to your folder in
the open dialog, select the script fi le sound.js and press Open.
4 Select the sound script in the Object Presets palette and click in a Scene view to place the script icon in the scene.










