Lingo (programming language) explained

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.[1] [2]

Lingo is the primary programming language on the Adobe Shockwave platform, which dominated the interactive multimedia product market during the 1990s.[3] 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, and the Didi & Ditto series. 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.[4] [5] Lingo supports specialized syntax for image processing and 3D object manipulation.[6] 3D meshes can also be created on the fly using Lingo.[6]

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: if the visibility of sprite 5 then go to the frameIn 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: if sprite(5).visible then _movie.go(_movie.frame)This format uses elements of the Director Object Model, introduced in Director MX 2004. The syntax in prior versions would be like: if sprite(5).visible then go the frame

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.

Behavior and parent scripts encourage good object-oriented programming. Movie scripts are not as OOP-oriented. However, they can still be used to make black-box handlers, where other objects can input raw data and receive answers back, without knowing the inner workings of the box. Using the strengths and ease-of-use of Director's programming methodology, with the advantages of OOP makes for a powerful and fast programming environment.

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

XObjects

Lingo 3.0 was also extensible through External Factories (XFactories) or XObjects (later replaced by Lingo Xtras), which provided programmatic extensions to Director. For example, controlling external media devices such as CD-ROM and Video tape players through Macintosh SerialPort. XObject API was openly available to developers and media device producers, which added to the popularity and versatility of Lingo. Macromind was very active in positioning the XObject API as standard for external media devices to collaborate through Lingo; and its interest as a standard achieved a lot of involvement from prominent and burgeoning media product companies through an ad hoc group called the Multimedia Association.

Xtras

Starting with Director version 4.0, Lingo was extensible through a new improved class of external plugin called Xtras. Xtras were developed in C++ using the Microsoft Component Object Model (COM). The standardization with COM helped attract developers to creating a market for such plug-ins.

Imaging Lingo

Imaging Lingo was introduced with Director 8.0, and allowed developers to write high-performance image manipulation commands using a simple syntax. There are some similarities to functions of image applications (like Photoshop), that make it easy to create dynamic, code-based visual effects. Image manipulation was also added into ActionScript 3.0 with the BitmapData class. As this included more sophisticated commands, Director was also updated to allow conversion between the BitmapData object and its own Image objects.

3D

Director 8.5 introduced a DirectX 3D engine that could be scripted with Lingo. Lingo was updated substantially to support the new 3D objects and now includes a full-featured set of 3D commands. An Xtra was also created to enable use of the Havok 3D Physics engine, and later the AGEIA PhysX engine, in Director 11.

Other languages

These other languages are perhaps not as well known as the Macromedia language. However, a legal anomaly remains in the UK that the trademark of the word 'Lingo' is held by Linn Smart Computing.

External links

Notes and References

  1. https://books.google.com/books?id=R3d6H9c-x3wC Macromedia Shockwave for Director User's Guide, Volume 1
  2. https://books.google.com/books?id=8nAQ6l1TnGgC Macromedia Shockwave for Director, Volume 1
  3. Book: Kelly Hart. Mitch Geller. New Perspectives on Dreamweaver CS3, Comprehensive. 2008. Cengage Learning. 1-4239-2531-9. 429.
  4. https://books.google.com/books?id=V34_AQAAIAAJ Macromedia Director 8: Creating Powerful Multimedia
  5. https://books.google.com/books?id=vYlQAAAAMAAJ Inside Macromedia Director 6 with Lingo
  6. https://books.google.com/books?id=EV-AlWngGy0C Macromedia Director 8.5 Shockwave Studio for 3D: Training from the Source
  7. Web site: Rekursiv Project - Lingo Language . June 7, 2007 . https://web.archive.org/web/20070607082132/http://www.erg.abdn.ac.uk/research/projects/lingo.html . 7 June 2007 . dead.