Writing Lingo Statements - MACROMEDIA DIRECTOR MX-USING DIRECTOR MX Use Manual

Table of Contents

Advertisement

Optional keywords and abbreviated commands
You can abbreviate some Lingo statements. Abbreviated versions of a command are easier to enter
but may be less readable than the longer versions. The
following statements are equivalent, but the last one uses the fewest keystrokes.
go to frame "This Marker"
go to "This Marker"
go "This Marker"
It is good practice to use the same abbreviations throughout a movie so your Lingo is easier
to read.
Describing conditions
A script often needs to determine whether a certain condition exists before carrying out a set of
instructions. For example, a script may need to check whether a network operation is finished
before doing something that requires the operation's result.
The term
or the number 1 indicates that the condition you're testing for exists. The term
TRUE
or the number 0 indicates that a condition doesn't exist.
FALSE

Writing Lingo statements

When you are writing statements in a Lingo script, you can choose between two types of syntax:
verbose syntax and dot syntax.
Verbose syntax
Verbose syntax is similar to English. Because of this, verbose syntax is an excellent way to learn to
program for the first time: as a new programmer, you can read verbose Lingo and get a fairly good
idea of what it is doing. Most users will start out writing Lingo exclusively with verbose syntax
because it is so easy to understand.
Here are three examples of verbose Lingo that is very English-like and has a literal meaning:
set the stageColor to 255
put the text of member "Instructions" after member "Introduction"
if x=5 then
go to frame 22
end if
Almost all of Lingo's functionality is available through verbose syntax, but there are a few
exceptions. Most of these exceptions are found in Lingo used for manipulating text.
The disadvantage of verbose Lingo is that it can quickly become very long when you write
complex scripts. Longer scripts are harder to read and debug. Once your scripts reach a certain
level of complexity, you may find it easier to use dot syntax.
For several examples that compare verbose and dot syntax, see the next section.
392
Chapter 16
command is a good example. All the
go

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX-USING DIRECTOR MX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Director mx

Table of Contents