This document provides an overview of the ScalaScript language and its capabilities.
When you create a project in Scala Designer, you use Designer's user-interface to compose and sequence media. If you were to open your project in a text editor, you would see a ScalaScript, which is the document format that represents your project. Most users never need to concern themselves with the details of ScalaScript, because Designer takes care of all that for them. That said, various advanced results can be achieved by hand-editing ScalaScripts. Often this is done by creating the basic project in Designer, then embellishing it using a text editor.
If you need to use a feature or capability that is not supported by Designer, manual updating of a script may be required. It is possible to create new scripts outside of Designer, as well as hand-edit scripts that were created by Designer. Loading a hand-edited or hand-authored script into Designer can occasionally produce unexpected results.
The ScalaScript Language
ScalaScript is a language used for storing Scala Player scripts. The Scala Player internally stores scripts as an object tree, where playing the script consists of traversing the tree and passing methods to the objects. When a script is saved, it is converted into a text file containing commands and directives that allow the object hierarchy to be reconstructed at a later time.
It is important to understand that the ScalaScript language is not a traditional procedural (imperative) programming language. Commands in a ScalaScript script are not executed (played back) one after another, like a Basic or C program. Rather, a ScalaScript script is a description of an application and its components, much like a description in English. The Player and the EX modules use this description to build an object model of the script. When the script is played, the objects are activated and deactivated according to the structure of the script. However, they may also react to external stimuli (such as input events or hardware interrupts) to asynchronously cause changes in the playback of the script. That is, these script objects may perform operations even if they are not being directed by the Player to do so.
Also, keep in mind that the ScalaScript language was designed primarily to be authored in a graphical user interface. It would certainly look different if it was intended to be programmed directly.