CLASS 2 • TECHNICAL OBJECTIVES

Skill 2.1) Introduction to manipulating data in editable text fields
Lingo: put...into, on mouseUp, editable property, nested if-then statements


EXAMPLE:The following lingo transfers the text "Hello" and appends text from the field called "Name" into to the field named "Greeting." The use of "&&" concatenates expressions with a space, and "&" leaves no space between concatenated expressions.

put "Hello" && field "Name" into field "Greeting"

Skillscheck 2.1) Make a copy of the movie below.

Extra practice: Game Ex 3 (multimedia class): Try to copy the Shockwave movie displayed.

Introduction to using global variables in Director

Global variables can be shared among handlers and movies. A global variable exists and retains its value as long as Director is running or until you issue the clearGlobals command.

Every handler that declares a variable as global can use the variable's current value. If the handler changes the variable's value, the new value is available to every other handler that treats the variable as global. It's good practice to start the names of all global variables with a lowercase g. This helps identify which variables are global when you examine Lingo code. Because you usually want global variables to be available throughout a movie, it is good practice to declare global variables in an "on startMovie" handler. This ensures that the global variables are available from the very start of the movie.

Syntax: clearGlobals

Description Command; sets all global variables to VOID.

Syntax: showGlobals

Description Command; displays all global variables in the Message window.

Global Variables skills check: