User Guide

ADOBE ATMOSPHERE 181
User Guide
Chapter 14: Adding Interactivity
Scripting adds the dimension of interactive behavior to Atmosphere worlds and objects. Non-technical users and
beginners will be pleased to learn that Atmospheres drag-and-drop scripting requires no programming knowledge.
Atmosphere ships with a selection of useful pre-built behaviors, and users can easily import and use scripts obtained
from others.
Programmers will be pleased to know that Atmosphere has a rich API that allows control of virtually every aspect of
an Atmosphere world including its physics. Atmosphere supports JavaScript, the World-Wide Web’s widely used and
well-documented scripting language.
i
This chapter covers the basics of using scripts in Atmosphere. A more detailed tutorial is included in Appendix D,
“JavaScript API Documentation,” and Appendix E, “JavaScript API Table of Modules.
Drag and Drop Scripting
As mentioned, Atmosphere ships with a number of preset scripts that can easily be added to objects and scenes
to enable a number of interesting and useful behaviors. You can fi nd a complete list of script presets and their
descriptions in Appendix C, “Preset Libraries.
Loading Scripts
Scripts can be imported into Atmosphere using the File > Import > Scripts menu command. You can also place
scripts in the Object Presets palette using the Add Script Preset command in the palette menu. Both of these options
will open a fi le dialog box to locate and load the Script fi les which typically have a JS extension. Imported presets
appear as Script icons in the Object Presets palette.
You can load several script presets at once by Shift- or Control-selecting scripts in the Open File dialog box.
Scripts can be added to the Object Presets palette.