Lingo is a verbose object-oriented (OO) scripting language developed by John H. Thompson for use in Adobe Director (formerly Macromedia Director). Lingo is used to develop desktop application software, interactive kiosks, CD-ROMs and Adobe Shockwave content. Lingo is the primary programming language on the Adobe Shockwave platform, which dominated the interactive multimedia product market during the 1990s. Various graphic adventure games were developed with Lingo during the 1990s, including The Journeyman Project, Total Distortion, Mia's Language Adventure, Mia's Science Adventure, the Didi & Ditto series, and a number of games from Headbone Interactive. Hundreds of free online video games were developed using Lingo, and published on websites such as Miniclip and Shockwave.com. Lingo can be used to build user interfaces, to manipulate raster graphics, vector graphics and 3D computer graphics, and other data processing tasks. Lingo supports specialized syntax for image processing and 3D object manipulation. 3D meshes can also be created on the fly using Lingo.
History Lingo was invented by John H. Thompson at MacroMind in 1989, and first released with Director 2.2. Jeff Tanner developed and tested Lingo for Director 2.2 and 3.0, created custom XObjects for various media device producers, language extension examples using XFactory including the XFactory application programming interface (API), and wrote the initial tutorials on how to use Lingo. Dave Shields tested and documented Object-based Lingo for Director 3.13 and 4.0. He ran build scripts to create weekly releases for testing, originated the Macromedia KnowledgeBase, created examples of how to write Lingo XTRA plug-ins in C++, and assembled the Golden Master disks of Macromedia Director that were shipped to the duplicator. Lingo was quickly adopted by burgeoning multimedia community during the 1990s and the already popular Director product. Initially, about 90% of the users only used 10% of Lingo's features; primarily go to the frame by multimedia authors of tutorials and presentations. However, 10% of the users were game developers who took a wider interest in the other 90% of its abilities, including their own function extensions by creating their own XFactories/XObjects. The Journeyman Project is a prominent example of this.
Features Lingo is embedded into Adobe Director, and can be added as scripts on objects or on the timeline. Lingo is an object-oriented programming (OOP) language, and supports Smalltalk-like verbose syntax, OO dot syntax, and inheritance.
Verbose syntax When Lingo was created, a verbose syntax was designed to mimic spoken language, so it would be easy for new users. Users could write HyperTalk-like sentences such as:
In go to statements, the "to" is optional, and unlike other programming languages, go statements reference frames in Director's Score, not specific code lines. Lingo was also initially very robust by providing object generation through a notion called factory, which led to the language's extensibility through External Factories (XFactories) or XObjects. For Director 3.13 and later versions, extensibility occurred via a different type of plug-in called an XTRA, based upon the Microsoft Component Object Model (COM).
Dot syntax Although it is still possible to use the verbose syntax, the current version of the language fully supports OO dot syntax, so that the code looks more like standard programming languages such as JavaScript or C++. The equivalent in new scripting style would be:
This format uses elements of the Director Object Model, introduced in Director MX 2004. The syntax in prior versions would be like:
Scripting There are 4 types of Lingo scripts in Director, each with a specific purpose. Each type of script may be added to certain types of compatible objects.
Cast scripts work only with their member, not all events can be used with them. Behavior scripts are attached to a sprite or inserted into a frame. Sprite behaviors are often used to give control of the sprite's properties and movement. Frame behaviors can be used to create a pause or delay within a certain frame in the score. Behaviors make it easy to program in an object-oriented way, as you can directly see the relationship between the programming and the item they are attached to. They can also control or interact with other sprites, making them a true object. Movie scripts are not attached to sprites nor can they be instantiated as Objects. They are available throughout the program (movie) and are especially useful for holding global handlers and initializing global variables at the start or end of the movie. Parent scripts are used to birth (create instances of) an object into a variable using the new command. These objects can control sprites and other media remotely, without being attached to any one sprite, may be used to control data or other non-displayed items, and are useful for recursion routines such as pathfinding. A Parent script can be used to create or destroy an object at any time, freeing them from the confines of the score that a Behavior is limited to. Behavior and parent scripts in Director support object-oriented programming practices, while movie scripts are generally less object-oriented in structure. movie scripts can still be used to create handlers that receive input from other objects and return results without exposing their internal processes. This approach combines Director's scripting model with some principles associated with object- oriented programming.
Inheritance Lingo supports object inheritance by a slightly idiosyncratic system: a script can have an ancestor property which references another object (usually also a script, although other objects such as cast members can also be ancestors). Properties and methods of the ancestor are inherited by the parent. Behavior scripts are also a kind of ancestor of the sprites to which they are attached, since properties and methods of the behavior can be accessed by reference to the sprite itself. In this case, it is a kind of multiple inheritance, as one sprite may have several behaviors.
Extensibility
… excerpt ends here. Continue reading the full article.