Lingo (programming language)

Lingo (programming language)

The name Lingo has been used by several unrelated programming languages. Its most common version is a scripting language developed by John H. Thompson for use in Macromedia Director. HyperTalk is likely to have been one of the inspirations for Lingo.

yntax of Macromedia Lingo

When Macromedia Lingo was created, the syntax was designed to mimic spoken language, so it would be easy for beginners to get started. You could write whole HyperTalk-like sentences like:

if sprite 5 is visible then go to the frame

Note that in "go to" statements the "to" is optional. Also note that unlike other programming languages, "go" statements reference frames in Director's Score, not particular lines of code.

Although it is still possible to use the old syntax, the latest version of the language fully supports 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 Document Object Model, introduced in Director MX 2004. The syntax in prior versions would be like:

if sprite(5).visible then go the frame

Usage of Macromedia Lingo

Macromedia Lingo is embedded into Macromedia Director, leaving to Director the low-level details of graphics and OS interaction.

Object-oriented programming (OOP) is encouraged by both the language and the Director community. However, OOP is not the only way; this offers Director programmers speed and flexibility in development as they work in both a timeline and a programming structure.

There are 3 types of scripts in Macromedia Lingo:
*behavior scripts are attached to a sprite to control that sprite's properties and movement. They 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 anytime, freeing them from the confines of the score that a Behavior is limited to.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.

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, we have a kind of multiple inheritance, as one sprite may have several behaviors.

Imaging in Macromedia Lingo

A very powerful part of the language is Imaging Lingo. It was introduced when Director version 8.0 arrived. It gives the user the power of image manipulation with simple commands. There are some similarities to functions of image applications (like Photoshop), that make it easy to create visual effects. Since then imaging has also been added to Adobe Flash's ActionScript language with the Flash BitmapData object. As this included more sophisticated commands, Director was also updated to allow conversion between the BitmapData object and its own Image objects.

3D in Macromedia Lingo

In Director 8.5, a full 3D engine was included for the first time. Lingo was updated substantially to support the new 3D objects and now includes a well-featured (if by now slightly out of date) set of 3D commands. An Xtra was also created to enable use of the Havok 3D Physics engine.

Other languages called Lingo

* A language called [http://www.lingolanguage.i12.com/ Lingo] was released for software development under Windows. This version was designed as a compilable high level programming language.

* A programming language based on Smalltalk was developed for the Rekursiv processor developed by Linn Smart Computing in Scotland, UK. This language was called [http://www.erg.abdn.ac.uk/research/projects/lingo.html Lingo] and is significant because the manufacturers successfully obtained a trade mark in the UK.

* Lingo is also a programming language for solving linear, nonlinear and integer optimization problems, first developed in 1988 by [http://www.lindo.com/products/lingo/lingom.html Lindo Systems Inc.] This language is still in production.

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

External links

Useful resources

* [http://www.jmckell.com/ Animation Math in Lingo] - Great tutorials for beginners and experts.
* [http://www.deansdirectortutorials.com/ Dean's Director Tutorials] - Tutorials ranging from the basics of Director to advanced programming with Lingo.
* [http://www.directorforum.com Directorforum - Director User Group]
* [http://director-online.com/ Director Online] - Articles and forums on various Director topics.
* [http://www.mcli.dist.maricopa.edu/director/ DirectorWeb] - One of the oldest Director resource sites. Exists in archive mode now.
* [http://www.lingoworkshop.com/ Lingoworkshop] - Multiple demos with source code available.
* [http://www.mediamacros.com/ MediaMacros] - Hundreds of free scripts, opens source games, and a database of Xtras (Plugins).

Mailing lists

* [http://listserv.uark.edu/archives/direct-l.html Direct-L] is the biggest Lingo mailing list


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Lingo — may refer to:* LINGO Modeling Language * Lingo (programming language), one of several unrelated programming languages * Lingo (Dutch game show) * Lingo (Portuguese game show) * Lingo (Quebec game show) * Lingo (US game show) * Lingo (UK game… …   Wikipedia

  • Object-oriented programming language — An object oriented programming language (also called an OO language ) is one that allows or encourages, to some degree, object oriented programming techniques such as encapsulation, inheritance, modularity, and polymorphism. Simula (1967) is… …   Wikipedia

  • language — /lang gwij/, n. 1. a body of words and the systems for their use common to a people who are of the same community or nation, the same geographical area, or the same cultural tradition: the two languages of Belgium; a Bantu language; the French… …   Universalium

  • language — noun /ˈlæŋɡwɪʤ/ a) A form of communication using words either spoken or gestured with the hands and structured with grammar, often with a writing system. the English language b) The ability to communicate using words. sign language …   Wiktionary

  • language — I (New American Roget s College Thesaurus) System of communication Nouns 1. language, tongue, lingo, vernacular, mother tongue, protolanguage; living or dead language; idiom, parlance, phraseology; wording; dialect, patois, cant, jargon, lingo,… …   English dictionary for students

  • List of programming languages — Programming language lists Alphabetical Categorical Chronological Generational The aim of this list of programming languages is to include all notable programming languages in existence, both those in current use and historical ones, in… …   Wikipedia

  • Linear programming — (LP, or linear optimization) is a mathematical method for determining a way to achieve the best outcome (such as maximum profit or lowest cost) in a given mathematical model for some list of requirements represented as linear relationships.… …   Wikipedia

  • List of Celtic language media — The list below contains information on the different types of media available in the Celtic languages.AllOnly a handful of media contain all the Celtic languages. An example is Carn magazine, which has contained columns in all six languages since …   Wikipedia

  • Adobe Director — Infobox Software name = Adobe Director caption = Director 11 running on Windows XP. developer = Adobe Systems, formerly Macromedia latest release version = 11.0.0.426 latest release date = release date|2008|03|25 operating system = Mac OS X and… …   Wikipedia

  • Adobe Director — Este artículo o sección necesita referencias que aparezcan en una publicación acreditada, como revistas especializadas, monografías, prensa diaria o páginas de Internet fidedignas. Puedes añadirlas así o avisar …   Wikipedia Español

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”