>> Lingo Exercise

Familiarize yourself with the following lingo elements by looking them up and reading code example from the Lingo Dictionary. Write a working script that contains all of them. A useful technique is to copy and paste code examples from the Lingo Dictionary and adapt them to your needs. Use the message window accessible from "Window" at the top menu to debug your code. (Click the "Trace Icon" to see each line of code appear in the message window as it executes.) Using the "put" command will "put" variable contents to the message window. You can use the Paint Window to quickly make simple visuals elements to use as cast members in your script.

on mouseUp
on mouseEnter
on mouseLeave
on exitFrame
on enterFrame
goToFrame
if logicalExpression then statement
set
put
beep

Example script which uses the lingo terms "mouseUp, "set", and "put":

on mouseUp

local x
set x to 5
put x

end

In the above example "set x to 5"sets the value of variable x to 5. "put x" puts the value contained in x to the message window located under "Window" at the top menu. You can use Director's built-in Debugger instead of the Message window to debug your script if you prefer.